CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ObjectHeader Struct Reference
Collaboration diagram for ObjectHeader:

Public Member Functions

 ObjectHeader ()
 
char * GetDescription ()
 
void SetDescription (char *description)
 
unsigned char * GetData ()
 

Public Attributes

uint64_t txn_id
 
uint32_t size_data
 
uint32_t size_desc
 
union {
   int32_t   refcnt
 
   int32_t   neg_nbytes_written
 
}; 
 
cvmcache_object_type type
 
struct cvmcache_hash id
 

Detailed Description

Header of the data pieces in the cache. After the object header, the zero-terminated description and the object data follows.

Definition at line 43 of file cvmfs_cache_ram.cc.

Constructor & Destructor Documentation

ObjectHeader::ObjectHeader ( )
inline

Definition at line 44 of file cvmfs_cache_ram.cc.

Member Function Documentation

unsigned char* ObjectHeader::GetData ( )
inline

Definition at line 66 of file cvmfs_cache_ram.cc.

Referenced by PluginRamCache::ram_pread(), and PluginRamCache::ram_write_txn().

Here is the caller graph for this function:

char* ObjectHeader::GetDescription ( )
inline

Definition at line 53 of file cvmfs_cache_ram.cc.

Referenced by PluginRamCache::ram_listing_begin(), and PluginRamCache::ram_obj_info().

Here is the caller graph for this function:

void ObjectHeader::SetDescription ( char *  description)
inline

Definition at line 59 of file cvmfs_cache_ram.cc.

Referenced by PluginRamCache::ram_start_txn().

Here is the caller graph for this function:

Member Data Documentation

union { ... }

During a transaction, neg_nbytes_written is used to track the number of already written bytes. On commit, refcnt is set to 1.

int32_t ObjectHeader::neg_nbytes_written
uint32_t ObjectHeader::size_data
uint32_t ObjectHeader::size_desc

String length + 1 (null terminated) or null if the description is NULL.

Definition at line 84 of file cvmfs_cache_ram.cc.

Referenced by PluginRamCache::ram_start_txn().

uint64_t ObjectHeader::txn_id

Set during a running transaction so that we know where to look for pointers when the memory block gets compacted. Once committed, this is uint64_t(-1).

Definition at line 76 of file cvmfs_cache_ram.cc.

Referenced by PluginRamCache::OnBlockMove(), PluginRamCache::ram_commit_txn(), and PluginRamCache::ram_start_txn().


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