This file include all common types internal to derecho and not necessarily being known by a client program. More...
Classes | |
class | _NameMaker |
class | FilePersistLog |
struct | hlc_index_entry |
struct | hlc_index_entry_comp |
class | IDeltaObjectFactory |
class | IDeltaSupport |
class | ITemporalQueryFrontierProvider |
union | log_entry |
struct | log_entry.fields |
union | meta_header |
struct | meta_header.fields |
class | Persistent |
class | PersistentRegistry |
PersistentRegistry is a book for all the Persistent<T> or Volatile<T> variables. More... | |
class | PersistLog |
class | Volatile |
Typedefs | |
typedef union persistent::meta_header | MetaHeader |
typedef union persistent::log_entry | LogEntry |
using | DeltaFinalizer = std::function< void(char const *const, std::size_t)> |
using | version_t = int64_t |
using | VersionFunc = std::function< void(const version_t &, const HLC &)> |
using | PersistFunc = std::function< const version_t(void)> |
using | TrimFunc = std::function< void(const version_t &)> |
using | LatestPersistedGetterFunc = std::function< const version_t(void)> |
using | TruncateFunc = std::function< void(const int64_t &)> |
Enumerations | |
enum | StorageType { ST_FILE = 0, ST_MEM, ST_3DXP } |
Functions | |
template<typename TKey , typename KeyGetter > | |
int64_t | binarySearch (const KeyGetter &, const TKey &, const int64_t &, const int64_t &) |
template<typename int_type > | |
version_t | combine_int32s (const int_type high_bits, const int_type low_bits) |
Helper function for creating Persistent version numbers out of MulticastGroup sequence numbers and View IDs. More... | |
template<typename int_type > | |
std::pair< int_type, int_type > | unpack_version (const version_t packed_int) |
Helper function for unpacking a Persistent version number into two signed or unsigned int32 values. More... | |
template<typename ObjectType , StorageType storageType> | |
void | saveObject (ObjectType &obj, const char *object_name=nullptr) noexcept(false) |
saveObject() saves a serializable object More... | |
template<typename ObjectType , StorageType storageType> | |
std::unique_ptr< ObjectType > | loadObject (const char *object_name=nullptr) noexcept(false) |
loadObject() loads a serializable object from a persistent store More... | |
template<StorageType storageType> | |
const std::enable_if<(storageType==ST_FILE||storageType==ST_MEM), version_t >::type | getMinimumLatestPersistedVersion (const std::type_index &subgroup_type, uint32_t subgroup_index, uint32_t shard_num) |
get the minmum latest persisted version for a Replicated<T> identified by More... | |
template<typename ObjectType , StorageType storageType> | |
void | saveNoLogObjectInFile (ObjectType &obj, const char *object_name) noexcept(false) |
save object in file More... | |
template<typename ObjectType , StorageType storageType> | |
std::unique_ptr< ObjectType > | loadNoLogObjectFromFile (const char *object_name, mutils::DeserializationManager *dm=nullptr) noexcept(false) |
load data from file More... | |
template<typename ObjectType > | |
void | saveNoLogObjectInMem (ObjectType &obj, const char *object_name) noexcept(false) |
template<typename ObjectType > | |
std::unique_ptr< ObjectType > | loadNoLogObjectFromMem (const char *object_name, mutils::DeserializationManager *dm=nullptr) noexcept(false) |
This file include all common types internal to derecho and not necessarily being known by a client program.
Compilation Macros: _PERFORMANCE_DEBUG.
union persistent::log_entry |
Definition at line 33 of file FilePersistLog.hpp.
Class Members | ||
---|---|---|
uint8_t | bytes[64] | |
struct log_entry | fields |
struct persistent::log_entry.fields |
Definition at line 34 of file FilePersistLog.hpp.
Class Members | ||
---|---|---|
uint64_t | dlen | |
uint64_t | hlc_l | |
uint64_t | hlc_r | |
uint64_t | ofst | |
int64_t | ver |
struct persistent::meta_header.fields |
Definition at line 19 of file FilePersistLog.hpp.
Class Members | ||
---|---|---|
int64_t | head | |
int64_t | tail | |
int64_t | ver |
using persistent::DeltaFinalizer = typedef std::function<void(char const* const, std::size_t)> |
Definition at line 255 of file Persistent.hpp.
using persistent::LatestPersistedGetterFunc = typedef std::function<const version_t(void)> |
Definition at line 22 of file PersistentTypenames.hpp.
typedef union persistent::log_entry persistent::LogEntry |
typedef union persistent::meta_header persistent::MetaHeader |
using persistent::PersistFunc = typedef std::function<const version_t(void)> |
Definition at line 20 of file PersistentTypenames.hpp.
using persistent::TrimFunc = typedef std::function<void(const version_t &)> |
Definition at line 21 of file PersistentTypenames.hpp.
using persistent::TruncateFunc = typedef std::function<void(const int64_t &)> |
Definition at line 23 of file PersistentTypenames.hpp.
using persistent::version_t = typedef int64_t |
Definition at line 15 of file PersistentTypenames.hpp.
using persistent::VersionFunc = typedef std::function<void(const version_t &,const HLC &)> |
Definition at line 19 of file PersistentTypenames.hpp.
Enumerator | |
---|---|
ST_FILE | |
ST_MEM | |
ST_3DXP |
Definition at line 21 of file PersistLog.hpp.
int64_t persistent::binarySearch | ( | const KeyGetter & | , |
const TKey & | , | ||
const int64_t & | , | ||
const int64_t & | |||
) |
version_t persistent::combine_int32s | ( | const int_type | high_bits, |
const int_type | low_bits | ||
) |
Helper function for creating Persistent version numbers out of MulticastGroup sequence numbers and View IDs.
Packs two 32-bit integer types into an unsigned 64-bit int; the template allows them to be signed or unsigned.
high_bits | The integer that should become the high order bits of the version number. |
low_bits | The integer that should become the low order bits of the version number |
Definition at line 7 of file Persistent_impl.hpp.
const std::enable_if<(storageType==ST_FILE||storageType==ST_MEM), version_t >::type persistent::getMinimumLatestPersistedVersion | ( | const std::type_index & | subgroup_type, |
uint32_t | subgroup_index, | ||
uint32_t | shard_num | ||
) |
get the minmum latest persisted version for a Replicated<T> identified by
subgroup_type | |
subgroup_index | |
shard_num |
Definition at line 611 of file Persistent_impl.hpp.
|
noexcept |
|
noexcept |
Definition at line 54 of file PersistNoLog.hpp.
|
noexcept |
loadObject() loads a serializable object from a persistent store
Definition at line 597 of file Persistent_impl.hpp.
|
noexcept |
save object in file
obj | Reference to the object to be persistent |
object_name | name of the object |
Definition at line 10 of file PersistNoLog_impl.hpp.
|
noexcept |
Definition at line 38 of file PersistNoLog.hpp.
|
noexcept |
saveObject() saves a serializable object
obj | The object to be persisted. |
object_name | Optional object name. If not given, the object_name is <storage type>="">-<object type="" name>="">-nolog. NOTE: please provide an object name if you trying to persist two objects of the same type. NOTE: the object has to be ByteRepresentable. |
Definition at line 579 of file Persistent_impl.hpp.
std::pair< int_type, int_type > persistent::unpack_version | ( | const version_t | packed_int | ) |
Helper function for unpacking a Persistent version number into two signed or unsigned int32 values.
The template parameter determines whether each 32-bit half of the version number will be intepreted as a signed int or an unsigned int.
packed_int | The version number to unpack |
Definition at line 12 of file Persistent_impl.hpp.