XrdFileCache::Info Class Reference

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

#include <XrdFileCacheInfo.hh>

List of all members.

Public Member Functions

 Info ()
 Constructor.
 ~Info ()
 Destructor.
void SetBit (int i)
 Mark block as downloaded.
void ResizeBits (int n)
 Reserve buffer for fileSize/bufferSize bytes.
int Read (XrdOssDF *fp)
 Rea load content from cinfo file into this object.
void WriteHeader (XrdOssDF *fp)
 Write number of blocks and prefetch buffer size.
void AppendIOStat (const Stats *stat, XrdOssDF *fp)
 Append access time, and cache statistics.
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.
int GetHeaderSize () const
 Get header size.
bool GetLatestDetachTime (time_t &t, XrdOssDF *fp) const
 Get latest detach time.
long long GetBufferSize () const
 Get prefetch buffer size.
bool TestBit (int i) const
 Test if block at the given index is downlaoded.
bool IsComplete () const
 Get complete status.
void CheckComplete ()
 Update complete status.

Static Public Attributes

static const char * m_infoExtension

Private Member Functions

XrdCl::Log * clLog () const

Static Private Member Functions

static unsigned char cfiBIT (int n)

Private Attributes

int m_version
 info version
long long m_bufferSize
 prefetch buffer size
int m_sizeInBits
 number of file blocks
unsigned char * m_buff
 download state vector
int m_accessCnt
 number of written AStat structs
bool m_complete
 cached

Classes

struct  AStat
 Cache statistics and time of access. More...


Detailed Description

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


Constructor & Destructor Documentation

XrdFileCache::Info::Info (  ) 

Constructor.

XrdFileCache::Info::~Info (  ) 

Destructor.


Member Function Documentation

void XrdFileCache::Info::AppendIOStat ( const Stats stat,
XrdOssDF fp 
)

Append access time, and cache statistics.

static unsigned char XrdFileCache::Info::cfiBIT ( int  n  )  [inline, static, private]

void XrdFileCache::Info::CheckComplete (  )  [inline]

Update complete status.

XrdCl::Log* XrdFileCache::Info::clLog (  )  const [inline, private]

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::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.

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:
fp file handle
Returns:
number of bytes read

void XrdFileCache::Info::ResizeBits ( int  n  ) 

Reserve buffer for fileSize/bufferSize bytes.

Parameters:
n number of file blocks

void XrdFileCache::Info::SetBit ( int  i  )  [inline]

Mark block as downloaded.

Parameters:
i block 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 [private]

number of written AStat structs

unsigned char* XrdFileCache::Info::m_buff [private]

download state vector

long long XrdFileCache::Info::m_bufferSize [private]

prefetch buffer size

bool XrdFileCache::Info::m_complete [private]

cached

const char* XrdFileCache::Info::m_infoExtension [static]

int XrdFileCache::Info::m_sizeInBits [private]

number of file blocks

int XrdFileCache::Info::m_version [private]

info version


The documentation for this class was generated from the following file:
Generated on 12 Dec 2014 for xrootd by  doxygen 1.4.7