CernVM-FS  2.9.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

Constructor & Destructor Documentation

ObjectHeader::ObjectHeader ( )

Definition at line 44 of file

Member Function Documentation

unsigned char* ObjectHeader::GetData ( )

Definition at line 66 of file

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

Here is the caller graph for this function:

char* ObjectHeader::GetDescription ( )

Definition at line 53 of file

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

Here is the caller graph for this function:

void ObjectHeader::SetDescription ( char *  description)

Definition at line 59 of file

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

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

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

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