OmniSciDB  ba1bac9284
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Epoch Struct Reference

#include <Epoch.h>

Public Member Functions

 Epoch ()
 
 Epoch (const int32_t epoch_floor, const int32_t epoch_ceiling)
 
int32_t floor () const
 
int32_t ceiling () const
 
void floor (const int32_t epoch_floor)
 
void ceiling (const int32_t epoch_ceiling)
 
int32_t increment ()
 
int8_t * storage_ptr ()
 

Static Public Member Functions

static size_t byte_size ()
 
static int64_t min_allowable_epoch ()
 
static int64_t max_allowable_epoch ()
 

Private Attributes

int64_t epoch_storage [2]
 

Detailed Description

Definition at line 30 of file Epoch.h.

Constructor & Destructor Documentation

Epoch::Epoch ( )
inline

Definition at line 32 of file Epoch.h.

References epoch_storage.

32  {
33  epoch_storage[0] = std::numeric_limits<int32_t>::min();
34  epoch_storage[1] = 0;
35  }
int64_t epoch_storage[2]
Definition: Epoch.h:74
Epoch::Epoch ( const int32_t  epoch_floor,
const int32_t  epoch_ceiling 
)
inline

Definition at line 37 of file Epoch.h.

References epoch_storage.

37  {
38  epoch_storage[0] = epoch_floor;
39  epoch_storage[1] = epoch_ceiling;
40  }
int64_t epoch_storage[2]
Definition: Epoch.h:74

Member Function Documentation

static size_t Epoch::byte_size ( )
inlinestatic

Definition at line 63 of file Epoch.h.

Referenced by File_Namespace::FileMgr::createEpochFile(), File_Namespace::FileMgr::openAndReadEpochFile(), File_Namespace::TableFileMgr::TableFileMgr(), File_Namespace::TableFileMgr::writeAndSyncEpochToDisk(), and File_Namespace::FileMgr::writeAndSyncEpochToDisk().

63 { return 2 * sizeof(int64_t); }

+ Here is the caller graph for this function:

int32_t Epoch::ceiling ( ) const
inline

Definition at line 44 of file Epoch.h.

References epoch_storage.

Referenced by File_Namespace::FileMgr::FileMgr(), File_Namespace::TableFileMgr::getEpoch(), File_Namespace::TableFileMgr::incrementEpoch(), File_Namespace::FileMgr::init(), File_Namespace::FileMgr::migrateEpochFileV0(), File_Namespace::FileMgr::openFiles(), and File_Namespace::FileMgr::setEpoch().

44 { return epoch_storage[1]; }
int64_t epoch_storage[2]
Definition: Epoch.h:74

+ Here is the caller graph for this function:

void Epoch::ceiling ( const int32_t  epoch_ceiling)
inline

Definition at line 52 of file Epoch.h.

References epoch_storage.

52 { epoch_storage[1] = epoch_ceiling; }
int64_t epoch_storage[2]
Definition: Epoch.h:74
int32_t Epoch::floor ( ) const
inline

Definition at line 43 of file Epoch.h.

References epoch_storage.

Referenced by File_Namespace::FileMgr::init(), File_Namespace::FileMgr::migrateEpochFileV0(), File_Namespace::FileMgr::rollOffOldData(), and File_Namespace::FileMgr::setEpoch().

43 { return epoch_storage[0]; }
int64_t epoch_storage[2]
Definition: Epoch.h:74

+ Here is the caller graph for this function:

void Epoch::floor ( const int32_t  epoch_floor)
inline

Definition at line 47 of file Epoch.h.

References epoch_storage.

47  {
48  epoch_storage[0] = epoch_floor;
49  ;
50  }
int64_t epoch_storage[2]
Definition: Epoch.h:74
int32_t Epoch::increment ( )
inline

Definition at line 54 of file Epoch.h.

References epoch_storage.

Referenced by File_Namespace::TableFileMgr::incrementEpoch().

54 { return ++epoch_storage[1]; }
int64_t epoch_storage[2]
Definition: Epoch.h:74

+ Here is the caller graph for this function:

static int64_t Epoch::max_allowable_epoch ( )
inlinestatic

Definition at line 69 of file Epoch.h.

Referenced by File_Namespace::TableFileMgr::incrementEpoch(), and File_Namespace::FileMgr::incrementEpoch().

69  {
70  return std::numeric_limits<int32_t>::max() - 1;
71  }

+ Here is the caller graph for this function:

static int64_t Epoch::min_allowable_epoch ( )
inlinestatic

Definition at line 65 of file Epoch.h.

Referenced by File_Namespace::FileMgr::migrateEpochFileV0().

65  {
66  return std::numeric_limits<int32_t>::min();
67  }

+ Here is the caller graph for this function:

int8_t* Epoch::storage_ptr ( )
inline

Allows access to ptr to epoch internal storage for atomic file reads and writes to epoch storage

Definition at line 61 of file Epoch.h.

References epoch_storage.

Referenced by File_Namespace::FileMgr::openAndReadEpochFile(), File_Namespace::TableFileMgr::TableFileMgr(), File_Namespace::TableFileMgr::writeAndSyncEpochToDisk(), and File_Namespace::FileMgr::writeAndSyncEpochToDisk().

61 { return reinterpret_cast<int8_t*>(&epoch_storage[0]); }
int64_t epoch_storage[2]
Definition: Epoch.h:74

+ Here is the caller graph for this function:

Member Data Documentation

int64_t Epoch::epoch_storage[2]
private

Definition at line 74 of file Epoch.h.

Referenced by ceiling(), Epoch(), floor(), increment(), and storage_ptr().


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