Coda Distributed File System
Public Member Functions | List of all members
SegmentedCacheFile Class Reference

#include <fso_cachefile.h>

Inheritance diagram for SegmentedCacheFile:
Inheritance graph
[legend]
Collaboration diagram for SegmentedCacheFile:
Collaboration graph
[legend]

Public Member Functions

 SegmentedCacheFile (int i) REQUIRES_TRANSACTION
 
 ~SegmentedCacheFile ()
 
void Associate (CacheFile *cf) REQUIRES_TRANSACTION
 
int64_t ExtractSegment (uint64_t pos, int64_t count) REQUIRES_TRANSACTION
 
int64_t InjectSegment (uint64_t pos, int64_t count) REQUIRES_TRANSACTION
 
- Public Member Functions inherited from CacheFile
 CacheFile (int i, int recoverable=1, int partial=0) REQUIRES_TRANSACTION
 
 CacheFile ()
 
 ~CacheFile ()
 
void Create (int newlength=0) REQUIRES_TRANSACTION
 
int Open (int flags)
 
int Close (int fd)
 
FILE * FOpen (const char *mode)
 
int FClose (FILE *f)
 
void Validate () EXCLUDES_TRANSACTION
 
void Reset () EXCLUDES_TRANSACTION
 
int Copy (CacheFile *destination) REQUIRES_TRANSACTION
 
int Copy (char *destname, int recovering=0)
 
void IncRef ()
 
int DecRef ()
 
void Stat (struct stat *tstat)
 
void Utimes (const struct timeval times[2])
 
void Truncate (uint64_t newlen) REQUIRES_TRANSACTION
 
void SetLength (uint64_t newlen) REQUIRES_TRANSACTION
 
void SetValidData (uint64_t len) REQUIRES_TRANSACTION
 
void SetValidData (uint64_t start, int64_t len) REQUIRES_TRANSACTION
 
CacheChunkListGetHoles (uint64_t start, int64_t len)
 
CacheChunkListGetValidChunks (uint64_t start, int64_t len)
 
char * Name ()
 
uint64_t Length ()
 
uint64_t ValidData ()
 
uint64_t ConsecutiveValidData ()
 
int IsComplete ()
 
bool IsPartial ()
 
void SetPartial (bool is_partial) REQUIRES_TRANSACTION
 
void print ()
 
void print (FILE *fp)
 
void print (int fdes)
 

Additional Inherited Members

- Static Protected Member Functions inherited from CacheFile
static int64_t CopySegment (CacheFile *from, CacheFile *to, uint64_t pos, int64_t count) REQUIRES_TRANSACTION
 
- Protected Attributes inherited from CacheFile
char name [CACHEFILENAMELEN]
 

Detailed Description

Segmented cache file

Constructor & Destructor Documentation

◆ SegmentedCacheFile()

SegmentedCacheFile::SegmentedCacheFile ( int  i)

Constructor

Parameters
icache file identifier

◆ ~SegmentedCacheFile()

SegmentedCacheFile::~SegmentedCacheFile ( )

Destructor

Member Function Documentation

◆ Associate()

void SegmentedCacheFile::Associate ( CacheFile cf)

Associate the segmented cache file with it's original cache file

Parameters
cfcache file pointer

◆ ExtractSegment()

int64_t SegmentedCacheFile::ExtractSegment ( uint64_t  pos,
int64_t  count 
)

Extract a segment from the associated cache file

Parameters
posoffset within the file
countamount of bytes to be extracted

◆ InjectSegment()

int64_t SegmentedCacheFile::InjectSegment ( uint64_t  pos,
int64_t  count 
)

Inject a segment to the associated cache file

Parameters
posoffset within the file
countamount of bytes to be injected

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