0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Public Attributes | List of all members
Hypertable::MetaLog::Header Class Reference

Metalog file header. More...

#include <MetaLog.h>

Public Types

enum  { LENGTH = 16 }
 Enumeration containing static header length. More...
 

Public Member Functions

void encode (uint8_t **bufp) const
 Encodes MetaLog file header. More...
 
void decode (const uint8_t **bufp, size_t *remainp)
 Decodes serialized header. More...
 

Public Attributes

uint16_t version
 MetaLog definition version number More...
 
char name [14]
 MetaLog definition name (e.g. "mml" or "rsml") More...
 

Detailed Description

Metalog file header.

This class is used to facilitate encoding and decoding the header of a MetaLog file. The MetaLog is a server state log that is implemented as a directory containing a set of log files. Each log file holds the complete state and state transitions for the execution of a server. When the server starts, the last state log file is read in its entirety and a new file is created to hold the last known server state plus all subsequent state transitions the occur during the execution of the server. Each state log file begins with a header that is encoded and decoded by this class.

Definition at line 57 of file MetaLog.h.

Member Function Documentation

void Header::decode ( const uint8_t **  bufp,
size_t *  remainp 
)

Decodes serialized header.

Parameters
bufpAddress of destination buffer pointer (advanced by call).
remainpAddress of integer holding amount of remaining buffer (decremented by call).

Definition at line 46 of file MetaLog.cc.

void Header::encode ( uint8_t **  bufp) const

Encodes MetaLog file header.

The header is encoded as follows:

EncodingDescription
i16MetaLog definition version
char14MetaLog definition name (e.g. "mml" or "rsml")

Definition at line 40 of file MetaLog.cc.

Member Data Documentation

char Hypertable::MetaLog::Header::name[14]

MetaLog definition name (e.g. "mml" or "rsml")

Definition at line 88 of file MetaLog.h.

uint16_t Hypertable::MetaLog::Header::version

MetaLog definition version number

Definition at line 85 of file MetaLog.h.


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