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

Classes | |
| struct | AStat |
| Access statistics. More... | |
| struct | Store |
Public Member Functions | |
| Info (XrdSysTrace *trace, bool prefetchBuffer=false) | |
| Constructor. More... | |
| ~Info () | |
| Destructor. More... | |
| void | SetBitWritten (int i) |
| Mark block as written to disk. More... | |
| bool | TestBitWritten (int i) const |
| Test if block at the given index is written to disk. More... | |
| bool | TestBitPrefetch (int i) const |
| Test if block at the given index has been prefetched. More... | |
| void | SetBitPrefetch (int i) |
| Mark block as obtained through prefetch. More... | |
| void | SetBitSynced (int i) |
| Mark block as synced to disk. More... | |
| void | SetAllBitsSynced () |
| Mark all blocks as synced to disk. More... | |
| void | SetBufferSize (long long) |
| void | SetFileSize (long long) |
| void | ResizeBits (int n) |
| Reserve buffer for file_size / buffer_size 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 | CompactifyAccessRecords () |
| Compactify access records to the configured maximum. More... | |
| void | DisableDownloadStatus () |
| Disable allocating, writing, and reading of download 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... | |
| const AStat * | GetLastAccessStats () const |
| Get latest access stats. More... | |
| long long | GetBufferSize () const |
| Get prefetch buffer size. 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 () const |
| 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 Attributes | |
| static const char * | m_traceID |
| static const char * | s_infoExtension |
| static const int | s_defaultVersion |
| static size_t | s_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) |
| bool | ReadV2 (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.
| XrdPfc::Info::Info | ( | XrdSysTrace * | trace, |
| bool | prefetchBuffer = false |
||
| ) |
Constructor.
| XrdPfc::Info::~Info | ( | ) |
Destructor.
|
inlineprivate |
Referenced by SetBitPrefetch(), SetBitSynced(), SetBitWritten(), TestBitPrefetch(), and TestBitWritten().
| void XrdPfc::Info::CompactifyAccessRecords | ( | ) |
Compactify access records to the configured maximum.
| void XrdPfc::Info::DisableDownloadStatus | ( | ) |
Disable allocating, writing, and reading of download status.
|
inline |
Get number of accesses.
References XrdPfc::Info::Store::m_accessCnt, and m_store.
Referenced by XrdPfc::File::GetAccessCnt().
|
inline |
Get prefetch buffer size.
References XrdPfc::Info::Store::m_buffer_size, and m_store.
Referenced by XrdPfc::File::GetBlockSize().
| void XrdPfc::Info::GetCksum | ( | unsigned char * | buff, |
| char * | digest | ||
| ) |
Get md5 cksum.
|
inline |
Get expected data file size.
References GetLastDownloadedBlock(), XrdPfc::Info::Store::m_buffer_size, XrdPfc::Info::Store::m_file_size, m_sizeInBits, and m_store.
|
inline |
Get file size.
References XrdPfc::Info::Store::m_file_size, and m_store.
| const AStat* XrdPfc::Info::GetLastAccessStats | ( | ) | const |
Get latest access stats.
Referenced by XrdPfc::File::GetLastAccessStats().
|
inline |
Get number of the last downloaded block.
References m_sizeInBits, and TestBitWritten().
Referenced by GetExpectedDataFileSize().
| bool XrdPfc::Info::GetLatestDetachTime | ( | time_t & | t | ) | const |
Get latest detach time.
|
inline |
Get number of downloaded blocks.
References m_sizeInBits, and TestBitWritten().
Referenced by XrdPfc::File::GetNDownloadedBlocks(), and GetNDownloadedBytes().
|
inline |
Get number of downloaded bytes.
References GetNDownloadedBlocks(), XrdPfc::Info::Store::m_buffer_size, and m_store.
|
inline |
Get number of blocks represented in download-state bit-vector.
References m_sizeInBits.
Referenced by XrdPfc::File::GetNBlocks().
|
inline |
Get size of download-state bit-vector in bytes.
References m_sizeInBits.
Referenced by SetBitPrefetch(), SetBitSynced(), SetBitWritten(), TestBitPrefetch(), and TestBitWritten().
|
inline |
References m_trace.
|
inline |
Get version.
References m_store, and XrdPfc::Info::Store::m_version.
|
inline |
Check download status in given block range.
References TestBitWritten().
Referenced by UpdateDownloadCompleteStatus().
|
inline |
Get complete status.
References m_complete.
| bool XrdPfc::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 |
|
private |
| void XrdPfc::Info::ResizeBits | ( | int | n | ) |
Reserve buffer for file_size / buffer_size bytes.
| n | number of file blocks |
| void XrdPfc::Info::SetAllBitsSynced | ( | ) |
Mark all blocks as synced to disk.
|
inline |
Mark block as obtained through prefetch.
References cfiBIT(), GetSizeInBytes(), and m_buff_prefetch.
|
inline |
Mark block as synced to disk.
References cfiBIT(), GetSizeInBytes(), XrdPfc::Info::Store::m_buff_synced, and m_store.
|
inline |
Mark block as written to disk.
References cfiBIT(), GetSizeInBytes(), and m_buff_written.
| void XrdPfc::Info::SetBufferSize | ( | long long | ) |
| void XrdPfc::Info::SetFileSize | ( | long long | ) |
|
inline |
Test if block at the given index has been prefetched.
References cfiBIT(), GetSizeInBytes(), and m_buff_prefetch.
|
inline |
Test if block at the given index is written to disk.
References cfiBIT(), GetSizeInBytes(), and m_buff_written.
Referenced by GetLastDownloadedBlock(), GetNDownloadedBlocks(), and IsAnythingEmptyInRng().
|
inline |
Update complete status.
References IsAnythingEmptyInRng(), m_complete, and m_sizeInBits.
| bool XrdPfc::Info::Write | ( | XrdOssDF * | fp, |
| const std::string & | fname = "<unknown>" |
||
| ) |
Write number of blocks and read buffer size
| void XrdPfc::Info::WriteIOStat | ( | Stats & | s | ) |
Write bytes missed, hits, and disk.
| void XrdPfc::Info::WriteIOStatAttach | ( | ) |
Write open time in the last entry of access statistics.
| void XrdPfc::Info::WriteIOStatDetach | ( | Stats & | s | ) |
Write close time together with bytes missed, hits, and disk.
| void XrdPfc::Info::WriteIOStatSingle | ( | long long | bytes_disk | ) |
Write single open/close time for given bytes read from disk.
| void XrdPfc::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 TestBitPrefetch().
|
protected |
download state vector
Referenced by SetBitWritten(), and TestBitWritten().
|
private |
|
protected |
cached
Referenced by IsComplete(), and UpdateDownloadCompleteStatus().
|
protected |
constains current prefetch score
|
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 |
|
static |
|
static |
|
static |