CatapultServer
v0.5.0.1 (Elephant)
|
Public Types | |
using | CacheValueType = typename TCacheDescriptor::ValueType |
using | CacheViewType = typename TCacheDescriptor::CacheViewType |
using | CacheDeltaType = typename TCacheDescriptor::CacheDeltaType |
using | CacheReadOnlyType = typename CacheViewType::ReadOnlyView |
Public Member Functions | |
BasicCache (const CacheConfiguration &config, TSubViewArgs &&... subViewArgs) | |
Creates an empty cache with config and arguments (subViewArgs). More... | |
CacheViewType | createView () const |
Returns a locked view based on this cache. More... | |
CacheDeltaType | createDelta () |
Returns a locked cache delta based on this cache. More... | |
CacheDeltaType | createDetachedDelta () const |
void | commit (const CacheDeltaType &delta) |
Commits all pending changes from delta to the underlying storage. More... | |
Public Member Functions inherited from catapult::utils::MoveOnly | |
constexpr | MoveOnly ()=default |
Default constructor. More... | |
~MoveOnly ()=default | |
Default destructor. More... | |
MoveOnly (const NonCopyable &)=delete | |
Disabled copy constructor. More... | |
MoveOnly (MoveOnly &&)=default | |
Default move constructor. More... | |
MoveOnly & | operator= (const MoveOnly &)=delete |
Disabled assignment operator. More... | |
MoveOnly & | operator= (MoveOnly &&)=default |
Default move assignment operator. More... | |
Private Member Functions | |
template<typename TView , typename TSetView > | |
TView | createSubView (const TSetView &setView) const |
Static Private Member Functions | |
static void | Commit (TBaseSet &m_set, const CacheDeltaType &, std::false_type) |
static void | Commit (TBaseSet &m_set, const CacheDeltaType &delta, std::true_type) |
Private Attributes | |
TBaseSet | m_set |
std::tuple< TSubViewArgs... > | m_subViewArgs |
Basic cache implementation that supports multiple views and committing.
using catapult::cache::BasicCache< TCacheDescriptor, TBaseSet, TSubViewArgs >::CacheDeltaType = typename TCacheDescriptor::CacheDeltaType |
using catapult::cache::BasicCache< TCacheDescriptor, TBaseSet, TSubViewArgs >::CacheReadOnlyType = typename CacheViewType::ReadOnlyView |
using catapult::cache::BasicCache< TCacheDescriptor, TBaseSet, TSubViewArgs >::CacheValueType = typename TCacheDescriptor::ValueType |
using catapult::cache::BasicCache< TCacheDescriptor, TBaseSet, TSubViewArgs >::CacheViewType = typename TCacheDescriptor::CacheViewType |
|
inline |
Creates an empty cache with config and arguments (subViewArgs).
|
inline |
Commits all pending changes from delta to the underlying storage.
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inline |
Returns a locked cache delta based on this cache.
|
inline |
Returns a lockable cache delta based on this cache but without the ability to commit any changes to the original cache.
|
inlineprivate |
|
inline |
Returns a locked view based on this cache.
|
private |
|
private |