1 #ifndef __XRDFILECACHE_INFO_HH__
2 #define __XRDFILECACHE_INFO_HH__
26 #include "XrdCl/XrdClLog.hh"
37 namespace XrdFileCache
47 static unsigned char cfiBIT(
int n) {
return 1 << n; }
189 for (
int i = firstIdx; i <= lastIdx; ++i)
bool GetLatestDetachTime(time_t &t, XrdOssDF *fp) const
Get latest detach time.
Statistics of disk cache utilisation.
Definition: XrdFileCacheStats.hh:30
static const char * m_infoExtension
Definition: XrdFileCacheInfo.hh:138
long long GetBufferSize() const
Get prefetch buffer size.
Definition: XrdFileCacheInfo.hh:209
int GetSizeInBits() const
Get number of blocks represented in download-state bit-vector.
Definition: XrdFileCacheInfo.hh:177
time_t DetachTime
Definition: XrdFileCacheInfo.hh:149
bool IsComplete() const
Get complete status.
Definition: XrdFileCacheInfo.hh:182
long long BytesDisk
Definition: XrdFileCacheInfo.hh:150
Status of cached file. Can be read from and written into a binary file.
Definition: XrdFileCacheInfo.hh:44
void ResizeBits(int n)
Reserve buffer for fileSize/bufferSize bytes.
int m_version
info version
Definition: XrdFileCacheInfo.hh:155
void SetBit(int i)
Mark block as downloaded.
Definition: XrdFileCacheInfo.hh:200
static unsigned char cfiBIT(int n)
Definition: XrdFileCacheInfo.hh:47
void AppendIOStat(const Stats *stat, XrdOssDF *fp)
Append access time, and cache statistics.
static Log * GetLog()
Get default log.
void CheckComplete()
Update complete status.
Definition: XrdFileCacheInfo.hh:195
Cache statistics and time of access.
Definition: XrdFileCacheInfo.hh:147
bool IsAnythingEmptyInRng(int firstIdx, int lastIdx) const
Check download status in given block range.
Definition: XrdFileCacheInfo.hh:187
int GetHeaderSize() const
Get header size.
int Read(XrdOssDF *fp)
Rea load content from cinfo file into this object.
bool m_complete
cached
Definition: XrdFileCacheInfo.hh:160
int m_sizeInBits
number of file blocks
Definition: XrdFileCacheInfo.hh:157
int GetSizeInBytes() const
Get size of download-state bit-vector in bytes.
Definition: XrdFileCacheInfo.hh:172
long long BytesMissed
Definition: XrdFileCacheInfo.hh:152
long long BytesRam
Definition: XrdFileCacheInfo.hh:151
XrdCl::Log * clLog() const
Definition: XrdFileCacheInfo.hh:142
void WriteHeader(XrdOssDF *fp)
Write number of blocks and prefetch buffer size.
long long m_bufferSize
prefetch buffer size
Definition: XrdFileCacheInfo.hh:156
bool TestBit(int i) const
Test if block at the given index is downlaoded.
Definition: XrdFileCacheInfo.hh:163
int m_accessCnt
number of written AStat structs
Definition: XrdFileCacheInfo.hh:159
unsigned char * m_buff
download state vector
Definition: XrdFileCacheInfo.hh:158