Hermes
0.9.5-beta
Hierarchical Distributed I/O Buffering System
|
Engable persisting a VBucket
's linked Blobs to permanent storage.
More...
#include <traits.h>
Public Types | |
using | OffsetMap = std::unordered_map< std::string, u64 > |
Public Member Functions | |
PersistTrait (bool synchronous) | |
PersistTrait (const std::string &filename, const OffsetMap &offset_map, bool synchronous=false) | |
void | onAttach (HermesPtr hermes, VBucketID id, Trait *trait) |
void | onDetach (HermesPtr hermes, VBucketID id, Trait *trait) |
Currently a no-op. | |
void | onLink (HermesPtr hermes, TraitInput &input, Trait *trait) |
void | onUnlink (HermesPtr hermes, TraitInput &input, Trait *trait) |
Currently a no-op. | |
Public Member Functions inherited from hermes::api::Trait | |
Trait () | |
Default constructor. | |
Trait (TraitID id, const std::vector< TraitID > &conflict_traits, TraitType type) | |
Construct a Trait. More... | |
Public Attributes | |
std::string | filename |
std::unordered_map< std::string, u64 > | offset_map |
bool | synchronous |
Public Attributes inherited from hermes::api::Trait | |
TraitID | id |
std::vector< TraitID > | conflict_traits |
TraitType | type |
OnAttachCallback | onAttachFn |
OnAttachCallback | onDetachFn |
OnLinkCallback | onLinkFn |
OnLinkCallback | onUnlinkFn |
OnLinkCallback | onGetFn |
Engable persisting a VBucket
's linked Blobs to permanent storage.
using hermes::api::PersistTrait::OffsetMap = std::unordered_map<std::string, u64> |
offset map
|
explicit |
Constructor
|
explicit |
Constructor with file name and offset map
a binding function to run on attchment event
void hermes::api::PersistTrait::onLink | ( | HermesPtr | hermes, |
TraitInput & | input, | ||
Trait * | trait | ||
) |
a binding function to run on link event
std::string hermes::api::PersistTrait::filename |
The name of the file to flush the Blobs to.
std::unordered_map<std::string, u64> hermes::api::PersistTrait::offset_map |
Maps Blob names to offsets within a file.
bool hermes::api::PersistTrait::synchronous |
true if flushing data should block until finished, otherwise false.