|
xrootd
|
Status of cached file. Can be read from and written into a binary file. More...
#include <XrdFileCacheInfo.hh>

Classes | |
| struct | AStat |
| struct | Store |
Public Member Functions | |
| Info (XrdSysTrace *trace, bool prefetchBuffer=false) | |
| Constructor. More... | |
| ~Info () | |
| Destructor. More... | |
| void | SetBitWritten (int i) |
| Mark block as downloaded. More... | |
| void | SetBitSynced (int i) |
| Mark block as disk written. More... | |
| void | SetAllBitsSynced () |
| Mark all blocks as writte. More... | |
| void | SetBitPrefetch (int i) |
| Mark block as written from prefetchxs. More... | |
| void | SetBufferSize (long long) |
| void | SetFileSize (long long) |
| void | ResizeBits (int n) |
| Reserve buffer for fileSize/bufferSize bytes. More... | |
| bool | Read (XrdOssDF *fp, const std::string &fname="<unknown>") |
| Rea load content from cinfo file into this object. More... | |
| bool | Write (XrdOssDF *fp, const std::string &fname="<unknown>") |
| void | DisableDownloadStatus () |
| Disable allocating, writing, and reading of downlaod status. More... | |
| void | ResetAllAccessStats () |
| Reset IO Stats. More... | |
| void | WriteIOStatAttach () |
| Write open time in the last entry of access statistics. More... | |
| void | WriteIOStat (Stats &s) |
| Write bytes missed, hits, and disk. More... | |
| void | WriteIOStatDetach (Stats &s) |
| Write close time together with bytes missed, hits, and disk. More... | |
| void | WriteIOStatSingle (long long bytes_disk) |
| Write single open/close time for given bytes read from disk. More... | |
| void | WriteIOStatSingle (long long bytes_disk, time_t att, time_t dtc) |
| Write open/close with given time and bytes read from disk. More... | |
| bool | IsAnythingEmptyInRng (int firstIdx, int lastIdx) const |
| Check download status in given block range. More... | |
| int | GetSizeInBytes () const |
| Get size of download-state bit-vector in bytes. More... | |
| int | GetSizeInBits () const |
| Get number of blocks represented in download-state bit-vector. More... | |
| long long | GetFileSize () const |
| Get file size. More... | |
| bool | GetLatestDetachTime (time_t &t) const |
| Get latest detach time. More... | |
| long long | GetBufferSize () const |
| Get prefetch buffer size. More... | |
| bool | TestBit (int i) const |
| Test if block at the given index is downlaoded. More... | |
| bool | TestPrefetchBit (int i) const |
| Test if block at the given index is prewritten. More... | |
| bool | IsComplete () const |
| Get complete status. More... | |
| int | GetNDownloadedBlocks () const |
| Get number of downloaded blocks. More... | |
| long long | GetNDownloadedBytes () const |
| Get number of downloaded bytes. More... | |
| int | GetLastDownloadedBlock () const |
| Get number of the last downloaded block. More... | |
| long long | GetExpectedDataFileSize () const |
| Get expected data file size. More... | |
| void | UpdateDownloadCompleteStatus () |
| Update complete status. More... | |
| size_t | GetAccessCnt () |
| Get number of accesses. More... | |
| int | GetVersion () |
| Get version. More... | |
| const Store & | RefStoredData () const |
| Get stored data. More... | |
| void | GetCksum (unsigned char *buff, char *digest) |
| Get md5 cksum. More... | |
| XrdSysTrace * | GetTrace () const |
Static Public Member Functions | |
| static size_t | GetMaxNumAccess () |
Static Public Attributes | |
| static const char * | m_infoExtension |
| static const char * | m_traceID |
| static const int | m_defaultVersion |
| static const size_t | m_maxNumAccess |
Protected Attributes | |
| XrdSysTrace * | m_trace |
| Store | m_store |
| bool | m_hasPrefetchBuffer |
| constains current prefetch score More... | |
| unsigned char * | m_buff_written |
| download state vector More... | |
| unsigned char * | m_buff_prefetch |
| prefetch statistics More... | |
| int | m_sizeInBits |
| cached More... | |
| bool | m_complete |
| cached More... | |
Private Member Functions | |
| unsigned char | cfiBIT (int n) const |
| bool | ReadV1 (XrdOssDF *fp, const std::string &fname) |
Private Attributes | |
| XrdCksCalc * | m_cksCalc |
Status of cached file. Can be read from and written into a binary file.
| XrdFileCache::Info::Info | ( | XrdSysTrace * | trace, |
| bool | prefetchBuffer = false |
||
| ) |
Constructor.
| XrdFileCache::Info::~Info | ( | ) |
Destructor.
|
inlineprivate |
Referenced by SetBitPrefetch(), SetBitSynced(), SetBitWritten(), TestBit(), and TestPrefetchBit().
| void XrdFileCache::Info::DisableDownloadStatus | ( | ) |
Disable allocating, writing, and reading of downlaod status.
|
inline |
Get number of accesses.
References XrdFileCache::Info::Store::m_accessCnt, and m_store.
|
inline |
Get prefetch buffer size.
References XrdFileCache::Info::Store::m_bufferSize, and m_store.
| void XrdFileCache::Info::GetCksum | ( | unsigned char * | buff, |
| char * | digest | ||
| ) |
Get md5 cksum.
|
inline |
Get expected data file size.
References GetLastDownloadedBlock(), XrdFileCache::Info::Store::m_bufferSize, XrdFileCache::Info::Store::m_fileSize, m_sizeInBits, and m_store.
|
inline |
Get file size.
References XrdFileCache::Info::Store::m_fileSize, and m_store.
|
inline |
Get number of the last downloaded block.
References m_sizeInBits, and TestBit().
Referenced by GetExpectedDataFileSize().
| bool XrdFileCache::Info::GetLatestDetachTime | ( | time_t & | t | ) | const |
Get latest detach time.
|
inlinestatic |
References m_maxNumAccess.
|
inline |
Get number of downloaded blocks.
References m_sizeInBits, and TestBit().
Referenced by GetNDownloadedBytes().
|
inline |
Get number of downloaded bytes.
References GetNDownloadedBlocks(), XrdFileCache::Info::Store::m_bufferSize, and m_store.
|
inline |
Get number of blocks represented in download-state bit-vector.
References m_sizeInBits.
|
inline |
Get size of download-state bit-vector in bytes.
References m_sizeInBits.
Referenced by SetBitPrefetch(), SetBitSynced(), SetBitWritten(), TestBit(), and TestPrefetchBit().
|
inline |
References m_trace.
|
inline |
Get version.
References m_store, and XrdFileCache::Info::Store::m_version.
|
inline |
Check download status in given block range.
References TestBit().
Referenced by UpdateDownloadCompleteStatus().
|
inline |
Get complete status.
References m_complete.
| bool XrdFileCache::Info::Read | ( | XrdOssDF * | fp, |
| const std::string & | fname = "<unknown>" |
||
| ) |
Rea load content from cinfo file into this object.
| fp | file handle |
| fname | optional file name for trace output |
|
private |
|
inline |
Get stored data.
References m_store.
| void XrdFileCache::Info::ResizeBits | ( | int | n | ) |
Reserve buffer for fileSize/bufferSize bytes.
| n | number of file blocks |
| void XrdFileCache::Info::SetAllBitsSynced | ( | ) |
Mark all blocks as writte.
|
inline |
Mark block as written from prefetchxs.
| i | block index |
References cfiBIT(), GetSizeInBytes(), and m_buff_prefetch.
|
inline |
Mark block as disk written.
| i | block index |
References cfiBIT(), GetSizeInBytes(), XrdFileCache::Info::Store::m_buff_synced, and m_store.
|
inline |
Mark block as downloaded.
| i | block index |
References cfiBIT(), GetSizeInBytes(), and m_buff_written.
| void XrdFileCache::Info::SetBufferSize | ( | long | long | ) |
| void XrdFileCache::Info::SetFileSize | ( | long | long | ) |
|
inline |
Test if block at the given index is downlaoded.
References cfiBIT(), GetSizeInBytes(), and m_buff_written.
Referenced by GetLastDownloadedBlock(), GetNDownloadedBlocks(), and IsAnythingEmptyInRng().
|
inline |
Test if block at the given index is prewritten.
References cfiBIT(), GetSizeInBytes(), and m_buff_prefetch.
|
inline |
Update complete status.
References IsAnythingEmptyInRng(), m_complete, and m_sizeInBits.
| bool XrdFileCache::Info::Write | ( | XrdOssDF * | fp, |
| const std::string & | fname = "<unknown>" |
||
| ) |
Write number of blocks and read buffer size
| void XrdFileCache::Info::WriteIOStat | ( | Stats & | s | ) |
Write bytes missed, hits, and disk.
| void XrdFileCache::Info::WriteIOStatAttach | ( | ) |
Write open time in the last entry of access statistics.
| void XrdFileCache::Info::WriteIOStatDetach | ( | Stats & | s | ) |
Write close time together with bytes missed, hits, and disk.
| void XrdFileCache::Info::WriteIOStatSingle | ( | long long | bytes_disk | ) |
Write single open/close time for given bytes read from disk.
| void XrdFileCache::Info::WriteIOStatSingle | ( | long long | bytes_disk, |
| time_t | att, | ||
| time_t | dtc | ||
| ) |
Write open/close with given time and bytes read from disk.
|
protected |
prefetch statistics
Referenced by SetBitPrefetch(), and TestPrefetchBit().
|
protected |
download state vector
Referenced by SetBitWritten(), and TestBit().
|
private |
|
protected |
cached
Referenced by IsComplete(), and UpdateDownloadCompleteStatus().
|
static |
|
protected |
constains current prefetch score
|
static |
|
static |
Referenced by GetMaxNumAccess().
|
protected |
cached
Referenced by GetExpectedDataFileSize(), GetLastDownloadedBlock(), GetNDownloadedBlocks(), GetSizeInBits(), GetSizeInBytes(), and UpdateDownloadCompleteStatus().
|
protected |
Referenced by GetAccessCnt(), GetBufferSize(), GetExpectedDataFileSize(), GetFileSize(), GetNDownloadedBytes(), GetVersion(), RefStoredData(), and SetBitSynced().
|
protected |
Referenced by GetTrace().
|
static |
1.8.5