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. | |
| ~Info () | |
| Destructor. | |
| void | SetBitWritten (int i) |
| Mark block as written to disk. | |
| bool | TestBitWritten (int i) const |
| Test if block at the given index is written to disk. | |
| bool | TestBitPrefetch (int i) const |
| Test if block at the given index has been prefetched. | |
| void | SetBitPrefetch (int i) |
| Mark block as obtained through prefetch. | |
| void | SetBitSynced (int i) |
| Mark block as synced to disk. | |
| void | SetAllBitsSynced () |
| Mark all blocks as synced to disk. | |
| void | SetBufferSize (long long) |
| void | SetFileSize (long long) |
| void | ResizeBits (int n) |
| Reserve buffer for fileSize/bufferSize bytes. | |
| bool | Read (XrdOssDF *fp, const std::string &fname="<unknown>") |
| Rea load content from cinfo file into this object. | |
| bool | Write (XrdOssDF *fp, const std::string &fname="<unknown>") |
| void | DisableDownloadStatus () |
| Disable allocating, writing, and reading of downlaod status. | |
| void | ResetAllAccessStats () |
| Reset IO Stats. | |
| void | WriteIOStatAttach () |
| Write open time in the last entry of access statistics. | |
| void | WriteIOStat (Stats &s) |
| Write bytes missed, hits, and disk. | |
| void | WriteIOStatDetach (Stats &s) |
| Write close time together with bytes missed, hits, and disk. | |
| void | WriteIOStatSingle (long long bytes_disk) |
| Write single open/close time for given bytes read from disk. | |
| void | WriteIOStatSingle (long long bytes_disk, time_t att, time_t dtc) |
| Write open/close with given time and bytes read from disk. | |
| bool | IsAnythingEmptyInRng (int firstIdx, int lastIdx) const |
| Check download status in given block range. | |
| int | GetSizeInBytes () const |
| Get size of download-state bit-vector in bytes. | |
| int | GetSizeInBits () const |
| Get number of blocks represented in download-state bit-vector. | |
| long long | GetFileSize () const |
| Get file size. | |
| bool | GetLatestDetachTime (time_t &t) const |
| Get latest detach time. | |
| long long | GetBufferSize () const |
| Get prefetch buffer size. | |
| bool | IsComplete () const |
| Get complete status. | |
| int | GetNDownloadedBlocks () const |
| Get number of downloaded blocks. | |
| long long | GetNDownloadedBytes () const |
| Get number of downloaded bytes. | |
| int | GetLastDownloadedBlock () const |
| Get number of the last downloaded block. | |
| long long | GetExpectedDataFileSize () const |
| Get expected data file size. | |
| void | UpdateDownloadCompleteStatus () |
| Update complete status. | |
| size_t | GetAccessCnt () |
| Get number of accesses. | |
| int | GetVersion () |
| Get version. | |
| const Store & | RefStoredData () const |
| Get stored data. | |
| void | GetCksum (unsigned char *buff, char *digest) |
| Get md5 cksum. | |
| 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 | |
| unsigned char * | m_buff_written |
| download state vector | |
| unsigned char * | m_buff_prefetch |
| prefetch statistics | |
| int | m_sizeInBits |
| cached | |
| bool | m_complete |
| cached | |
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.
| unsigned char XrdFileCache::Info::cfiBIT | ( | int | n | ) | const [inline, private] |
Referenced by SetBitPrefetch(), SetBitSynced(), SetBitWritten(), TestBitPrefetch(), and TestBitWritten().
| void XrdFileCache::Info::DisableDownloadStatus | ( | ) |
Disable allocating, writing, and reading of downlaod status.
| size_t XrdFileCache::Info::GetAccessCnt | ( | ) | [inline] |
Get number of accesses.
References XrdFileCache::Info::Store::m_accessCnt, and m_store.
| long long XrdFileCache::Info::GetBufferSize | ( | ) | const [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.
| long long XrdFileCache::Info::GetExpectedDataFileSize | ( | ) | const [inline] |
Get expected data file size.
References GetLastDownloadedBlock(), XrdFileCache::Info::Store::m_bufferSize, XrdFileCache::Info::Store::m_fileSize, m_sizeInBits, and m_store.
| long long XrdFileCache::Info::GetFileSize | ( | ) | const [inline] |
Get file size.
References XrdFileCache::Info::Store::m_fileSize, and m_store.
| int XrdFileCache::Info::GetLastDownloadedBlock | ( | ) | const [inline] |
Get number of the last downloaded block.
References m_sizeInBits, and TestBitWritten().
Referenced by GetExpectedDataFileSize().
| bool XrdFileCache::Info::GetLatestDetachTime | ( | time_t & | t | ) | const |
Get latest detach time.
| static size_t XrdFileCache::Info::GetMaxNumAccess | ( | ) | [inline, static] |
References m_maxNumAccess.
| int XrdFileCache::Info::GetNDownloadedBlocks | ( | ) | const [inline] |
Get number of downloaded blocks.
References m_sizeInBits, and TestBitWritten().
Referenced by GetNDownloadedBytes().
| long long XrdFileCache::Info::GetNDownloadedBytes | ( | ) | const [inline] |
Get number of downloaded bytes.
References GetNDownloadedBlocks(), XrdFileCache::Info::Store::m_bufferSize, and m_store.
| int XrdFileCache::Info::GetSizeInBits | ( | ) | const [inline] |
Get number of blocks represented in download-state bit-vector.
References m_sizeInBits.
| int XrdFileCache::Info::GetSizeInBytes | ( | ) | const [inline] |
Get size of download-state bit-vector in bytes.
References m_sizeInBits.
Referenced by SetBitPrefetch(), SetBitSynced(), SetBitWritten(), TestBitPrefetch(), and TestBitWritten().
| XrdSysTrace* XrdFileCache::Info::GetTrace | ( | ) | const [inline] |
References m_trace.
| int XrdFileCache::Info::GetVersion | ( | ) | [inline] |
Get version.
References m_store, and XrdFileCache::Info::Store::m_version.
| bool XrdFileCache::Info::IsAnythingEmptyInRng | ( | int | firstIdx, | |
| int | lastIdx | |||
| ) | const [inline] |
Check download status in given block range.
References TestBitWritten().
Referenced by UpdateDownloadCompleteStatus().
| bool XrdFileCache::Info::IsComplete | ( | ) | const [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 |
| bool XrdFileCache::Info::ReadV1 | ( | XrdOssDF * | fp, | |
| const std::string & | fname | |||
| ) | [private] |
| const Store& XrdFileCache::Info::RefStoredData | ( | ) | const [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 synced to disk.
| void XrdFileCache::Info::SetBitPrefetch | ( | int | i | ) | [inline] |
Mark block as obtained through prefetch.
References cfiBIT(), GetSizeInBytes(), and m_buff_prefetch.
| void XrdFileCache::Info::SetBitSynced | ( | int | i | ) | [inline] |
Mark block as synced to disk.
References cfiBIT(), GetSizeInBytes(), XrdFileCache::Info::Store::m_buff_synced, and m_store.
| void XrdFileCache::Info::SetBitWritten | ( | int | i | ) | [inline] |
Mark block as written to disk.
References cfiBIT(), GetSizeInBytes(), and m_buff_written.
| void XrdFileCache::Info::SetBufferSize | ( | long | long | ) |
| void XrdFileCache::Info::SetFileSize | ( | long | long | ) |
| bool XrdFileCache::Info::TestBitPrefetch | ( | int | i | ) | const [inline] |
Test if block at the given index has been prefetched.
References cfiBIT(), GetSizeInBytes(), and m_buff_prefetch.
| bool XrdFileCache::Info::TestBitWritten | ( | int | i | ) | const [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().
| void XrdFileCache::Info::UpdateDownloadCompleteStatus | ( | ) | [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, | |
| time_t | att, | |||
| time_t | dtc | |||
| ) |
Write open/close with given time and bytes read from disk.
| void XrdFileCache::Info::WriteIOStatSingle | ( | long long | bytes_disk | ) |
Write single open/close time for given bytes read from disk.
unsigned char* XrdFileCache::Info::m_buff_prefetch [protected] |
prefetch statistics
Referenced by SetBitPrefetch(), and TestBitPrefetch().
unsigned char* XrdFileCache::Info::m_buff_written [protected] |
download state vector
Referenced by SetBitWritten(), and TestBitWritten().
XrdCksCalc* XrdFileCache::Info::m_cksCalc [private] |
bool XrdFileCache::Info::m_complete [protected] |
cached
Referenced by IsComplete(), and UpdateDownloadCompleteStatus().
const int XrdFileCache::Info::m_defaultVersion [static] |
bool XrdFileCache::Info::m_hasPrefetchBuffer [protected] |
constains current prefetch score
const char* XrdFileCache::Info::m_infoExtension [static] |
const size_t XrdFileCache::Info::m_maxNumAccess [static] |
Referenced by GetMaxNumAccess().
int XrdFileCache::Info::m_sizeInBits [protected] |
cached
Referenced by GetExpectedDataFileSize(), GetLastDownloadedBlock(), GetNDownloadedBlocks(), GetSizeInBits(), GetSizeInBytes(), and UpdateDownloadCompleteStatus().
Store XrdFileCache::Info::m_store [protected] |
Referenced by GetAccessCnt(), GetBufferSize(), GetExpectedDataFileSize(), GetFileSize(), GetNDownloadedBytes(), GetVersion(), RefStoredData(), and SetBitSynced().
XrdSysTrace* XrdFileCache::Info::m_trace [protected] |
Referenced by GetTrace().
const char* XrdFileCache::Info::m_traceID [static] |
1.6.1