TxMemory Struct Reference

#include <txmem.h>

List of all members.

Public Member Functions

 TxMemory (const char *filename, unsigned long size)
unsigned long long commit ()
void abort ()

Public Attributes

int memory_size
int fd
char * M

Detailed Description

This class represents a transactional memory. See http://flow.yellowcouch.org/txmem/ for more information.

Definition at line 29 of file txmem.h.


Constructor & Destructor Documentation

TxMemory::TxMemory ( const char *  filename,
unsigned long  size 
)

Constructs or restores a memory as contained in the filename If the file tdid not exist, it will be created with the provided size. If a journal exists for the memory, it is first restored.

Definition at line 44 of file txmem.cpp.


Member Function Documentation

void TxMemory::abort (  ) 

Roll back to a last correct state. This is achieved by simply reopening the file from disk

Definition at line 296 of file txmem.cpp.

unsigned long long TxMemory::commit (  ) 

Commit all local changes to disk.

Definition at line 156 of file txmem.cpp.

Here is the caller graph for this function:


Member Data Documentation

This is the filedescriptor of the file that stores our memory. The content of this file is allways at a commit point. Intermediate states are not recorded.

Definition at line 37 of file txmem.h.

char* TxMemory::M

The memory itself

Definition at line 41 of file txmem.h.

Definition at line 31 of file txmem.h.


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

Generated by  doxygen 1.6.2