xrootd
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
XrdClientReadCache Class Reference

#include <XrdClientReadCache.hh>

Collaboration diagram for XrdClientReadCache:
Collaboration graph
[legend]

Public Types

enum  { kRmBlk_LRU = 0, kRmBlk_LeastOffs, kRmBlk_FIFO }
 

Public Member Functions

 XrdClientReadCache ()
 
 ~XrdClientReadCache ()
 
long GetDataIfPresent (const void *buffer, long long begin_offs, long long end_offs, bool PerfCalc, XrdClientIntvList &missingblks, long &outstandingblks)
 
void GetInfo (int &size, long long &bytessubmitted, long long &byteshit, long long &misscount, float &missrate, long long &readreqcnt, float &bytesusefulness)
 
long long GetTotalByteCount ()
 
void PutPlaceholder (long long begin_offs, long long end_offs)
 
void PrintPerfCounters ()
 
void PrintCache ()
 
void SubmitXMessage (XrdClientMessage *xmsg, long long begin_offs, long long end_offs)
 
bool SubmitRawData (const void *buffer, long long begin_offs, long long end_offs, bool pinned=false)
 
void RemoveItems (bool leavepinned=true)
 
void RemoveItems (long long begin_offs, long long end_offs, bool remove_overlapped=false)
 
void RemovePlaceholders ()
 
void SetSize (int sz)
 
void SetBlkRemovalPolicy (int p)
 
void UnPinCacheBlk (long long begin_offs, long long end_offs)
 
void * FindBlk (long long begin_offs, long long end_offs)
 
bool WillFit (long long bc)
 

Private Member Functions

long long GetTimestampTick ()
 
bool MakeFreeSpace (long long bytes)
 
bool RemoveItem ()
 
bool RemoveLRUItem ()
 
bool RemoveFirstItem ()
 
void UpdatePerfCounters ()
 
int FindInsertionApprox (long long begin_offs)
 
int FindInsertionApprox_rec (int startidx, int endidx, long long begin_offs)
 

Private Attributes

long long fBytesHit
 
long long fBytesSubmitted
 
float fBytesUsefulness
 
ItemVect fItems
 
long long fMaxCacheSize
 
long long fMissCount
 
float fMissRate
 
XrdSysRecMutex fMutex
 
long long fReadsCounter
 
int fBlkRemPolicy
 
long long fTimestampTickCounter
 
long long fTotalByteCount
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kRmBlk_LRU 
kRmBlk_LeastOffs 
kRmBlk_FIFO 

Constructor & Destructor Documentation

◆ XrdClientReadCache()

XrdClientReadCache::XrdClientReadCache ( )

◆ ~XrdClientReadCache()

XrdClientReadCache::~XrdClientReadCache ( )

Member Function Documentation

◆ FindBlk()

void* XrdClientReadCache::FindBlk ( long long  begin_offs,
long long  end_offs 
)

◆ FindInsertionApprox()

int XrdClientReadCache::FindInsertionApprox ( long long  begin_offs)
private

◆ FindInsertionApprox_rec()

int XrdClientReadCache::FindInsertionApprox_rec ( int  startidx,
int  endidx,
long long  begin_offs 
)
private

◆ GetDataIfPresent()

long XrdClientReadCache::GetDataIfPresent ( const void *  buffer,
long long  begin_offs,
long long  end_offs,
bool  PerfCalc,
XrdClientIntvList missingblks,
long &  outstandingblks 
)

◆ GetInfo()

void XrdClientReadCache::GetInfo ( int &  size,
long long &  bytessubmitted,
long long &  byteshit,
long long &  misscount,
float &  missrate,
long long &  readreqcnt,
float &  bytesusefulness 
)

◆ GetTimestampTick()

long long XrdClientReadCache::GetTimestampTick ( )
private

◆ GetTotalByteCount()

long long XrdClientReadCache::GetTotalByteCount ( )
inline

References fMutex, and fTotalByteCount.

◆ MakeFreeSpace()

bool XrdClientReadCache::MakeFreeSpace ( long long  bytes)
private

◆ PrintCache()

void XrdClientReadCache::PrintCache ( )

◆ PrintPerfCounters()

void XrdClientReadCache::PrintPerfCounters ( )
inline

◆ PutPlaceholder()

void XrdClientReadCache::PutPlaceholder ( long long  begin_offs,
long long  end_offs 
)

◆ RemoveFirstItem()

bool XrdClientReadCache::RemoveFirstItem ( )
private

◆ RemoveItem()

bool XrdClientReadCache::RemoveItem ( )
private

◆ RemoveItems() [1/2]

void XrdClientReadCache::RemoveItems ( bool  leavepinned = true)

◆ RemoveItems() [2/2]

void XrdClientReadCache::RemoveItems ( long long  begin_offs,
long long  end_offs,
bool  remove_overlapped = false 
)

◆ RemoveLRUItem()

bool XrdClientReadCache::RemoveLRUItem ( )
private

◆ RemovePlaceholders()

void XrdClientReadCache::RemovePlaceholders ( )

◆ SetBlkRemovalPolicy()

void XrdClientReadCache::SetBlkRemovalPolicy ( int  p)
inline

◆ SetSize()

void XrdClientReadCache::SetSize ( int  sz)
inline

References fMaxCacheSize.

Referenced by XrdClientConn::SetCacheSize().

◆ SubmitRawData()

bool XrdClientReadCache::SubmitRawData ( const void *  buffer,
long long  begin_offs,
long long  end_offs,
bool  pinned = false 
)

◆ SubmitXMessage()

void XrdClientReadCache::SubmitXMessage ( XrdClientMessage xmsg,
long long  begin_offs,
long long  end_offs 
)

◆ UnPinCacheBlk()

void XrdClientReadCache::UnPinCacheBlk ( long long  begin_offs,
long long  end_offs 
)

◆ UpdatePerfCounters()

void XrdClientReadCache::UpdatePerfCounters ( )
inlineprivate

◆ WillFit()

bool XrdClientReadCache::WillFit ( long long  bc)
inline

References fMaxCacheSize, and fMutex.

Referenced by XrdClientConn::CacheWillFit().

Member Data Documentation

◆ fBlkRemPolicy

int XrdClientReadCache::fBlkRemPolicy
private

Referenced by SetBlkRemovalPolicy().

◆ fBytesHit

long long XrdClientReadCache::fBytesHit
private

◆ fBytesSubmitted

long long XrdClientReadCache::fBytesSubmitted
private

◆ fBytesUsefulness

float XrdClientReadCache::fBytesUsefulness
private

◆ fItems

ItemVect XrdClientReadCache::fItems
private

◆ fMaxCacheSize

long long XrdClientReadCache::fMaxCacheSize
private

Referenced by SetSize(), and WillFit().

◆ fMissCount

long long XrdClientReadCache::fMissCount
private

◆ fMissRate

float XrdClientReadCache::fMissRate
private

◆ fMutex

XrdSysRecMutex XrdClientReadCache::fMutex
private

◆ fReadsCounter

long long XrdClientReadCache::fReadsCounter
private

◆ fTimestampTickCounter

long long XrdClientReadCache::fTimestampTickCounter
private

◆ fTotalByteCount

long long XrdClientReadCache::fTotalByteCount
private

Referenced by GetTotalByteCount().


The documentation for this class was generated from the following file: