1 #ifndef __XRDFILECACHE_INFO_HH__
2 #define __XRDFILECACHE_INFO_HH__
26 #include "XrdCl/XrdClLog.hh"
47 static unsigned char cfiBIT(
int n) {
return 1 << n; }
62 Info(
long long bufferSize);
234 for (
int i = firstIdx; i <= lastIdx; ++i)
bool GetLatestDetachTime(time_t &t, XrdOssDF *fp) const
Get latest detach time.
Definition: XrdFileCache.hh:30
int GetVersion()
Get version.
Definition: XrdFileCacheInfo.hh:171
static const char * m_infoExtension
Definition: XrdFileCacheInfo.hh:174
long long GetBufferSize() const
Get prefetch buffer size.
Definition: XrdFileCacheInfo.hh:263
long long GetNDownloadedBytes() const
Get number of downloaded bytes.
Definition: XrdFileCacheInfo.hh:212
int GetSizeInBits() const
Get number of blocks represented in download-state bit-vector.
Definition: XrdFileCacheInfo.hh:222
time_t DetachTime
Definition: XrdFileCacheInfo.hh:53
bool IsComplete() const
Get complete status.
Definition: XrdFileCacheInfo.hh:227
long long BytesDisk
close time
Definition: XrdFileCacheInfo.hh:54
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.
void AppendIOStat(AStat &stat, XrdOssDF *fp)
Append access time, and cache statistics.
int m_version
Cache statistics and time of access.
Definition: XrdFileCacheInfo.hh:184
static unsigned char cfiBIT(int n)
Definition: XrdFileCacheInfo.hh:47
static Log * GetLog()
Get default log.
unsigned char * m_buff_fetched
download state vector
Definition: XrdFileCacheInfo.hh:187
Info(long long bufferSize)
Constructor.
void CheckComplete()
Update complete status.
Definition: XrdFileCacheInfo.hh:240
unsigned char * m_buff_write_called
disk written state vector
Definition: XrdFileCacheInfo.hh:188
Definition: XrdFileCacheInfo.hh:51
bool IsAnythingEmptyInRng(int firstIdx, int lastIdx) const
Check download status in given block range.
Definition: XrdFileCacheInfo.hh:232
int GetHeaderSize() const
Get header size.
Definition: XrdClEnv.hh:28
int Read(XrdOssDF *fp)
Rea load content from cinfo file into this object.
bool m_complete
cached
Definition: XrdFileCacheInfo.hh:190
int GetAccessCnt()
Get number of accesses.
Definition: XrdFileCacheInfo.hh:166
void SetBitWriteCalled(int i)
Mark block as disk written.
Definition: XrdFileCacheInfo.hh:245
int m_sizeInBits
number of file blocks
Definition: XrdFileCacheInfo.hh:186
int GetSizeInBytes() const
Get size of download-state bit-vector in bytes.
Definition: XrdFileCacheInfo.hh:217
long long BytesMissed
read from ram
Definition: XrdFileCacheInfo.hh:56
int GetNDownloadedBlocks() const
Get number of downloaded blocks.
Definition: XrdFileCacheInfo.hh:203
long long BytesRam
read from disk
Definition: XrdFileCacheInfo.hh:55
XrdCl::Log * clLog() const
Definition: XrdFileCacheInfo.hh:178
void WriteHeader(XrdOssDF *fp)
Write number of blocks and prefetch buffer size.
void SetBitFetched(int i)
Mark block as downloaded.
Definition: XrdFileCacheInfo.hh:254
long long m_bufferSize
prefetch buffer size
Definition: XrdFileCacheInfo.hh:185
bool TestBit(int i) const
Test if block at the given index is downlaoded.
Definition: XrdFileCacheInfo.hh:193
int m_accessCnt
number of written AStat structs
Definition: XrdFileCacheInfo.hh:189