CatapultServer  v0.5.0.1 (Elephant)
catapult::mongo Namespace Reference

Namespaces

 mappers
 
 plugins
 
 storages
 

Classes

class  AggregateExternalCacheStorage
 Aggregate for saving cache data to external storage. More...
 
class  ApiStateChangeSubscriber
 Api state change subscriber. More...
 
struct  BulkWriteResult
 Result of a bulk write operation to the database. More...
 
class  ChainScoreProvider
 Interface for saving api chain score. More...
 
struct  DatabaseConfiguration
 Database configuration settings. More...
 
class  EmbeddedMongoTransactionPlugin
 An embedded mongo transaction plugin. More...
 
class  ExternalCacheStorage
 Abstract class for saving cache data to external storage. More...
 
class  ExternalCacheStorageBuilder
 Builder for creating an aggregate external cache storage around external cache storages. More...
 
class  ExternalCacheStorageT
 Typed interface for saving cache data to external storage. More...
 
class  MongoBulkWriter
 
class  MongoDatabase
 Represents a mongo database. More...
 
class  MongoErrorPolicy
 Error policy for checking mongo operation results. More...
 
class  MongoPluginManager
 A manager for registering mongo plugins. More...
 
class  MongoReceiptPlugin
 A mongo receipt plugin. More...
 
class  MongoReceiptPluginFactory
 Factory for creating mongo receipt plugins. More...
 
class  MongoReceiptRegistry
 A registry of mongo receipt plugins. More...
 
class  MongoStorageContext
 Context for creating a mongo storage. More...
 
struct  MongoTransactionMetadata
 Mongo transaction metadata. More...
 
class  MongoTransactionPlugin
 A mongo transaction plugin. More...
 
class  MongoTransactionPluginFactory
 Factory for creating mongo transaction plugins. More...
 
class  MongoTransactionPluginT
 A typed mongo transaction plugin. More...
 
class  MongoTransactionRegistry
 A registry of mongo transaction plugins. More...
 

Typedefs

using PluginModules = std::vector< plugins::PluginModule >
 Container of plugin modules. More...
 

Functions

void RegisterCoreMongoSystem (MongoPluginManager &manager)
 
std::unique_ptr< io::LightBlockStorageCreateMongoBlockStorage (MongoStorageContext &context, const MongoTransactionRegistry &transactionRegistry, const MongoReceiptRegistry &receiptRegistry)
 Creates a mongodb block storage around context, transactionRegistry and receiptRegistry. More...
 
BulkWriteResult TrySetChainInfoDocument (mongocxx::database &database, const bsoncxx::document::view &upsertDoc)
 Upserts the chain info document in database with upsertDoc. More...
 
bsoncxx::document::value GetChainInfoDocument (const mongocxx::database &database)
 Gets the chain info document from database. More...
 
std::unique_ptr< ChainScoreProviderCreateMongoChainScoreProvider (MongoStorageContext &context)
 Creates a mongodb chain score provider around context. More...
 
void LoadPluginByName (MongoPluginManager &manager, PluginModules &modules, const std::string &directory, const std::string &name)
 Loads a plugin named name with manager from directory into modules. More...
 
std::unique_ptr< cache::PtChangeSubscriberCreateMongoPtStorage (MongoStorageContext &context, const MongoTransactionRegistry &transactionRegistry)
 Creates a mongodb partial transaction storage around context and transactionRegistry. More...
 
std::unique_ptr< MongoReceiptPluginCreateBalanceTransferReceiptMongoPlugin (model::ReceiptType type)
 Creates a mongo balance transfer receipt plugin around type. More...
 
std::unique_ptr< MongoReceiptPluginCreateBalanceChangeReceiptMongoPlugin (model::ReceiptType type)
 Creates a mongo balance change receipt plugin around type. More...
 
std::unique_ptr< MongoReceiptPluginCreateInflationReceiptMongoPlugin (model::ReceiptType type)
 Creates a mongo inflation receipt plugin around type. More...
 
std::unique_ptr< subscribers::TransactionStatusSubscriberCreateMongoTransactionStatusStorage (MongoStorageContext &context)
 Creates a mongodb transaction status storage around context. More...
 
std::unique_ptr< cache::UtChangeSubscriberCreateMongoTransactionStorage (MongoStorageContext &context, const MongoTransactionRegistry &transactionRegistry, const std::string &collectionName)
 Creates a mongodb transaction storage around context and transactionRegistry for collection with name collectionName. More...
 

Typedef Documentation

◆ PluginModules

Container of plugin modules.

Function Documentation

◆ CreateBalanceChangeReceiptMongoPlugin()

std::unique_ptr<MongoReceiptPlugin> catapult::mongo::CreateBalanceChangeReceiptMongoPlugin ( model::ReceiptType  type)

Creates a mongo balance change receipt plugin around type.

Here is the caller graph for this function:

◆ CreateBalanceTransferReceiptMongoPlugin()

std::unique_ptr<MongoReceiptPlugin> catapult::mongo::CreateBalanceTransferReceiptMongoPlugin ( model::ReceiptType  type)

Creates a mongo balance transfer receipt plugin around type.

Here is the caller graph for this function:

◆ CreateInflationReceiptMongoPlugin()

std::unique_ptr<MongoReceiptPlugin> catapult::mongo::CreateInflationReceiptMongoPlugin ( model::ReceiptType  type)

Creates a mongo inflation receipt plugin around type.

Here is the caller graph for this function:

◆ CreateMongoBlockStorage()

std::unique_ptr< io::LightBlockStorage > catapult::mongo::CreateMongoBlockStorage ( MongoStorageContext context,
const MongoTransactionRegistry transactionRegistry,
const MongoReceiptRegistry receiptRegistry 
)

Creates a mongodb block storage around context, transactionRegistry and receiptRegistry.

◆ CreateMongoChainScoreProvider()

std::unique_ptr< ChainScoreProvider > catapult::mongo::CreateMongoChainScoreProvider ( MongoStorageContext context)

Creates a mongodb chain score provider around context.

◆ CreateMongoPtStorage()

std::unique_ptr< cache::PtChangeSubscriber > catapult::mongo::CreateMongoPtStorage ( MongoStorageContext context,
const MongoTransactionRegistry transactionRegistry 
)

Creates a mongodb partial transaction storage around context and transactionRegistry.

◆ CreateMongoTransactionStatusStorage()

std::unique_ptr< subscribers::TransactionStatusSubscriber > catapult::mongo::CreateMongoTransactionStatusStorage ( MongoStorageContext context)

Creates a mongodb transaction status storage around context.

◆ CreateMongoTransactionStorage()

std::unique_ptr< cache::UtChangeSubscriber > catapult::mongo::CreateMongoTransactionStorage ( MongoStorageContext context,
const MongoTransactionRegistry transactionRegistry,
const std::string &  collectionName 
)

Creates a mongodb transaction storage around context and transactionRegistry for collection with name collectionName.

◆ GetChainInfoDocument()

bsoncxx::document::value catapult::mongo::GetChainInfoDocument ( const mongocxx::database &  database)

Gets the chain info document from database.

◆ LoadPluginByName()

void catapult::mongo::LoadPluginByName ( MongoPluginManager manager,
PluginModules modules,
const std::string &  directory,
const std::string &  name 
)

Loads a plugin named name with manager from directory into modules.

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

◆ RegisterCoreMongoSystem()

void catapult::mongo::RegisterCoreMongoSystem ( MongoPluginManager manager)

Registers the mongo core system with manager.

Note
This plugin is required for database operation.
Here is the call graph for this function:

◆ TrySetChainInfoDocument()

BulkWriteResult catapult::mongo::TrySetChainInfoDocument ( mongocxx::database &  database,
const bsoncxx::document::view &  upsertDoc 
)

Upserts the chain info document in database with upsertDoc.