|
xrootd
|
Status of cached file. Can be read from and written into a binary file. More...
#include <XrdFileCacheInfo.hh>
Classes | |
| struct | AStat |
Public Member Functions | |
| Info (long long bufferSize) | |
| Constructor. More... | |
| ~Info () | |
| Destructor. More... | |
| void | SetBitFetched (int i) |
| Mark block as downloaded. More... | |
| void | SetBitWriteCalled (int i) |
| Mark block as disk written. More... | |
| void | ResizeBits (int n) |
| Reserve buffer for fileSize/bufferSize bytes. More... | |
| int | Read (XrdOssDF *fp) |
| Rea load content from cinfo file into this object. More... | |
| void | WriteHeader (XrdOssDF *fp) |
| Write number of blocks and prefetch buffer size. More... | |
| void | AppendIOStat (AStat &stat, XrdOssDF *fp) |
| Append access time, and cache statistics. 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... | |
| int | GetHeaderSize () const |
| Get header size. More... | |
| bool | GetLatestDetachTime (time_t &t, XrdOssDF *fp) 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 | 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... | |
| void | CheckComplete () |
| Update complete status. More... | |
| int | GetAccessCnt () |
| Get number of accesses. More... | |
| int | GetVersion () |
| Get version. More... | |
Static Public Attributes | |
| static const char * | m_infoExtension |
Protected Member Functions | |
| XrdCl::Log * | clLog () const |
Protected Attributes | |
| int | m_version |
| Cache statistics and time of access. More... | |
| long long | m_bufferSize |
| prefetch buffer size More... | |
| int | m_sizeInBits |
| number of file blocks More... | |
| unsigned char * | m_buff_fetched |
| download state vector More... | |
| unsigned char * | m_buff_write_called |
| disk written state vector More... | |
| int | m_accessCnt |
| number of written AStat structs More... | |
| bool | m_complete |
| cached More... | |
Static Private Member Functions | |
| static unsigned char | cfiBIT (int n) |
Status of cached file. Can be read from and written into a binary file.
| XrdFileCache::Info::Info | ( | long long | bufferSize | ) |
Constructor.
| XrdFileCache::Info::~Info | ( | ) |
Destructor.
Append access time, and cache statistics.
|
inlinestaticprivate |
Referenced by SetBitFetched(), SetBitWriteCalled(), and TestBit().
|
inline |
Update complete status.
References IsAnythingEmptyInRng(), m_complete, and m_sizeInBits.
|
inlineprotected |
References XrdCl::DefaultEnv::GetLog().
|
inline |
Get number of accesses.
References m_accessCnt.
|
inline |
Get prefetch buffer size.
References m_bufferSize.
| int XrdFileCache::Info::GetHeaderSize | ( | ) | const |
Get header size.
| bool XrdFileCache::Info::GetLatestDetachTime | ( | time_t & | t, |
| XrdOssDF * | fp | ||
| ) | const |
Get latest detach time.
|
inline |
Get number of downloaded blocks.
References m_sizeInBits, and TestBit().
Referenced by GetNDownloadedBytes().
|
inline |
Get number of downloaded bytes.
References GetNDownloadedBlocks(), and m_bufferSize.
|
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 SetBitFetched(), SetBitWriteCalled(), and TestBit().
|
inline |
Get version.
References m_version.
|
inline |
|
inline |
Get complete status.
References m_complete.
| int XrdFileCache::Info::Read | ( | XrdOssDF * | fp | ) |
Rea load content from cinfo file into this object.
| fp | file handle |
| void XrdFileCache::Info::ResizeBits | ( | int | n | ) |
Reserve buffer for fileSize/bufferSize bytes.
| n | number of file blocks |
|
inline |
Mark block as downloaded.
| i | block index |
References cfiBIT(), GetSizeInBytes(), and m_buff_fetched.
|
inline |
Mark block as disk written.
| i | block index |
References cfiBIT(), GetSizeInBytes(), and m_buff_write_called.
|
inline |
Test if block at the given index is downlaoded.
References cfiBIT(), GetSizeInBytes(), and m_buff_fetched.
Referenced by GetNDownloadedBlocks(), and IsAnythingEmptyInRng().
| void XrdFileCache::Info::WriteHeader | ( | XrdOssDF * | fp | ) |
Write number of blocks and prefetch buffer size.
|
protected |
number of written AStat structs
Referenced by GetAccessCnt().
|
protected |
download state vector
Referenced by SetBitFetched(), and TestBit().
|
protected |
disk written state vector
Referenced by SetBitWriteCalled().
|
protected |
prefetch buffer size
Referenced by GetBufferSize(), and GetNDownloadedBytes().
|
protected |
cached
Referenced by CheckComplete(), and IsComplete().
|
static |
|
protected |
number of file blocks
Referenced by CheckComplete(), GetNDownloadedBlocks(), GetSizeInBits(), and GetSizeInBytes().
|
protected |
1.8.5