xrootd
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Private Member Functions | List of all members
XrdFileCache::Info Class Reference

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)
 

Detailed Description

Status of cached file. Can be read from and written into a binary file.

Constructor & Destructor Documentation

XrdFileCache::Info::Info ( long long  bufferSize)

Constructor.

XrdFileCache::Info::~Info ( )

Destructor.

Member Function Documentation

void XrdFileCache::Info::AppendIOStat ( AStat stat,
XrdOssDF fp 
)

Append access time, and cache statistics.

static unsigned char XrdFileCache::Info::cfiBIT ( int  n)
inlinestaticprivate
void XrdFileCache::Info::CheckComplete ( )
inline

Update complete status.

XrdCl::Log* XrdFileCache::Info::clLog ( ) const
inlineprotected
int XrdFileCache::Info::GetAccessCnt ( )
inline

Get number of accesses.

long long XrdFileCache::Info::GetBufferSize ( ) const
inline

Get prefetch buffer size.

int XrdFileCache::Info::GetHeaderSize ( ) const

Get header size.

bool XrdFileCache::Info::GetLatestDetachTime ( time_t &  t,
XrdOssDF fp 
) const

Get latest detach time.

int XrdFileCache::Info::GetNDownloadedBlocks ( ) const
inline

Get number of downloaded blocks.

long long XrdFileCache::Info::GetNDownloadedBytes ( ) const
inline

Get number of downloaded bytes.

int XrdFileCache::Info::GetSizeInBits ( ) const
inline

Get number of blocks represented in download-state bit-vector.

int XrdFileCache::Info::GetSizeInBytes ( ) const
inline

Get size of download-state bit-vector in bytes.

int XrdFileCache::Info::GetVersion ( )
inline

Get version.

bool XrdFileCache::Info::IsAnythingEmptyInRng ( int  firstIdx,
int  lastIdx 
) const
inline

Check download status in given block range.

bool XrdFileCache::Info::IsComplete ( ) const
inline

Get complete status.

int XrdFileCache::Info::Read ( XrdOssDF fp)

Rea load content from cinfo file into this object.

Parameters
fpfile handle
Returns
number of bytes read
void XrdFileCache::Info::ResizeBits ( int  n)

Reserve buffer for fileSize/bufferSize bytes.

Parameters
nnumber of file blocks
void XrdFileCache::Info::SetBitFetched ( int  i)
inline

Mark block as downloaded.

Parameters
iblock index
void XrdFileCache::Info::SetBitWriteCalled ( int  i)
inline

Mark block as disk written.

Parameters
iblock index
bool XrdFileCache::Info::TestBit ( int  i) const
inline

Test if block at the given index is downlaoded.

void XrdFileCache::Info::WriteHeader ( XrdOssDF fp)

Write number of blocks and prefetch buffer size.

Member Data Documentation

int XrdFileCache::Info::m_accessCnt
protected

number of written AStat structs

unsigned char* XrdFileCache::Info::m_buff_fetched
protected

download state vector

unsigned char* XrdFileCache::Info::m_buff_write_called
protected

disk written state vector

long long XrdFileCache::Info::m_bufferSize
protected

prefetch buffer size

bool XrdFileCache::Info::m_complete
protected

cached

const char* XrdFileCache::Info::m_infoExtension
static
int XrdFileCache::Info::m_sizeInBits
protected

number of file blocks

int XrdFileCache::Info::m_version
protected

Cache statistics and time of access.

info version


The documentation for this class was generated from the following file: