CatapultServer  v0.5.0.1 (Elephant)
catapult::cache::RdbColumnContainer Class Reference

RocksDb-backed container adapter. More...

Inheritance diagram for catapult::cache::RdbColumnContainer:
Collaboration diagram for catapult::cache::RdbColumnContainer:

Public Member Functions

 RdbColumnContainer (RocksDatabase &database, size_t columnId)
 Creates an adapter around database and columnId. More...
 
size_t size () const
 Returns size of the column. More...
 
void setSize (size_t newSize)
 Sets size of the column to newSize. More...
 
template<typename TValue >
bool prop (const std::string &propertyName, TValue &value) const
 
template<typename TValue >
void setProp (const std::string &propertyName, const TValue &value)
 Sets property value of a column (propertyName) to value. More...
 
RocksDatabasedatabase ()
 Returns underlying database. More...
 

Protected Member Functions

void find (const RawBuffer &key, RdbDataIterator &iterator) const
 Finds element with key, storing result in iterator. More...
 
void insert (const RawBuffer &key, const std::string &value)
 Inserts element with key and value. More...
 
void remove (const RawBuffer &key)
 Removes element with key. More...
 
size_t prune (uint64_t pruningBoundary)
 Prunes elements below pruningBoundary. Returns number of pruned elements. More...
 

Private Member Functions

void load (const std::string &propertyName, const consumer< const char * > &sink) const
 
void save (const std::string &propertyName, const std::string &strValue)
 

Private Attributes

RocksDatabasem_database
 
size_t m_columnId
 
size_t m_size
 

Detailed Description

RocksDb-backed container adapter.

Constructor & Destructor Documentation

◆ RdbColumnContainer()

catapult::cache::RdbColumnContainer::RdbColumnContainer ( RocksDatabase database,
size_t  columnId 
)

Creates an adapter around database and columnId.

Here is the call graph for this function:

Member Function Documentation

◆ database()

RocksDatabase& catapult::cache::RdbColumnContainer::database ( )
inline

Returns underlying database.

◆ find()

void catapult::cache::RdbColumnContainer::find ( const RawBuffer &  key,
RdbDataIterator iterator 
) const
protected

Finds element with key, storing result in iterator.

Here is the call graph for this function:

◆ insert()

void catapult::cache::RdbColumnContainer::insert ( const RawBuffer &  key,
const std::string &  value 
)
protected

Inserts element with key and value.

Here is the call graph for this function:

◆ load()

void catapult::cache::RdbColumnContainer::load ( const std::string &  propertyName,
const consumer< const char * > &  sink 
) const
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ prop()

template<typename TValue >
bool catapult::cache::RdbColumnContainer::prop ( const std::string &  propertyName,
TValue &  value 
) const
inline

Returns false if property value of a column (propertyName) is not found, otherwise returns true and sets value to retrieved property value.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prune()

size_t catapult::cache::RdbColumnContainer::prune ( uint64_t  pruningBoundary)
protected

Prunes elements below pruningBoundary. Returns number of pruned elements.

Here is the call graph for this function:

◆ remove()

void catapult::cache::RdbColumnContainer::remove ( const RawBuffer &  key)
protected

Removes element with key.

Here is the call graph for this function:

◆ save()

void catapult::cache::RdbColumnContainer::save ( const std::string &  propertyName,
const std::string &  strValue 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setProp()

template<typename TValue >
void catapult::cache::RdbColumnContainer::setProp ( const std::string &  propertyName,
const TValue &  value 
)
inline

Sets property value of a column (propertyName) to value.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSize()

void catapult::cache::RdbColumnContainer::setSize ( size_t  newSize)

Sets size of the column to newSize.

Here is the call graph for this function:

◆ size()

size_t catapult::cache::RdbColumnContainer::size ( ) const

Returns size of the column.

Here is the caller graph for this function:

Member Data Documentation

◆ m_columnId

size_t catapult::cache::RdbColumnContainer::m_columnId
private

◆ m_database

RocksDatabase& catapult::cache::RdbColumnContainer::m_database
private

◆ m_size

size_t catapult::cache::RdbColumnContainer::m_size
private

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