CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
25 namespace catapult {
namespace mongo {
namespace plugins {
28 template<
typename TLockInfoTraits>
32 using KeyType =
typename TLockInfoTraits::KeyType;
33 using ModelType =
typename TLockInfoTraits::ModelType;
static auto MapToMongoId(const KeyType &key)
Maps key to a mongo identifier.
Definition: MongoLockInfoCacheStorageTraits.h:37
Mongo lock info cache storage traits.
Definition: MongoLockInfoCacheStorageTraits.h:29
PLUGIN_API void RegisterMongoSubsystem(catapult::mongo::MongoPluginManager &manager)
Entry point for registering a dynamic module with manager.
Definition: MongoHashLockPlugin.cpp:28
typename TLockInfoTraits::KeyType KeyType
Definition: MongoLockInfoCacheStorageTraits.h:32
void addTransactionSupport(std::unique_ptr< MongoTransactionPlugin > &&pTransactionPlugin)
Adds support for a transaction described by pTransactionPlugin.
Definition: MongoPluginManager.h:53
model::NetworkIdentifier networkIdentifier() const
Gets the network idenfifier.
Definition: MongoPluginManager.h:47
typename TLockInfoTraits::ModelType ModelType
Definition: MongoLockInfoCacheStorageTraits.h:33
void addStorageSupport(std::unique_ptr< TStorage > &&pStorage)
Adds support for an external cache storage described by pStorage.
Definition: MongoPluginManager.h:64
#define PLUGIN_API
Definition: plugins.h:30
A manager for registering mongo plugins.
Definition: MongoPluginManager.h:32
MongoStorageContext & mongoContext() const
Gets the mongo storage context.
Definition: MongoPluginManager.h:42
static auto MapToMongoDocument(const ModelType &lockInfo, model::NetworkIdentifier networkIdentifier)
Maps lockInfo given network networkIdentifier to a mongo document.
Definition: MongoLockInfoCacheStorageTraits.h:42
typename TLockInfoTraits::CacheDeltaType CacheDeltaType
Definition: MongoLockInfoCacheStorageTraits.h:31
PLUGIN_API std::unique_ptr< MongoTransactionPlugin > CreateHashLockTransactionMongoPlugin()
Creates a mongo hash lock transaction plugin.
Address PublicKeyToAddress(const Key &publicKey, NetworkIdentifier networkIdentifier)
Creates an address from a public key (publicKey) for the network identified by networkIdentifier.
Definition: Address.cpp:50
NetworkIdentifier
Possible network identifiers.
Definition: NetworkInfo.h:45
bsoncxx::document::value ToDbModel(const state::HashLockInfo &hashLockInfo, const Address &accountAddress)
Maps a hashLockInfo and accountAddress to the corresponding db model value.
Definition: HashLockInfoMapper.cpp:40
std::unique_ptr< MongoReceiptPlugin > CreateBalanceChangeReceiptMongoPlugin(model::ReceiptType type)
Creates a mongo balance change receipt plugin around type.
void addReceiptSupport(std::unique_ptr< MongoReceiptPlugin > &&pReceiptPlugin)
Adds support for a receipt described by pReceiptPlugin.
Definition: MongoPluginManager.h:58
Definition: AddressExtractionExtension.cpp:28
bsoncxx::types::b_binary ToBinary(const uint8_t *pData, size_t size)
Converts raw array (pData) of size elements into bson binary type.
Definition: MapperUtils.cpp:30