CatapultServer
v0.5.0.1 (Elephant)
|
Go to the documentation of this file.
25 namespace catapult {
namespace mongo {
31 template<
typename TStorage>
32 void add(std::unique_ptr<TStorage>&& pStorage) {
33 auto id = pStorage->id();
42 std::unique_ptr<ExternalCacheStorage>
build() {
43 std::vector<std::unique_ptr<ExternalCacheStorage>> storages;
46 storages.push_back(std::move(pStorage));
49 CATAPULT_LOG(
debug) <<
"creating ExternalCacheStorage with " << storages.size() <<
" storages";
50 return std::make_unique<AggregateExternalCacheStorage>(std::move(storages));
54 std::vector<std::unique_ptr<ExternalCacheStorage>>
m_storages;
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
def debug(*args)
Definition: Parser.py:46
std::unique_ptr< ExternalCacheStorage > build()
Builds an aggregate external cache storage.
Definition: ExternalCacheStorageBuilder.h:42
#define CATAPULT_THROW_INVALID_ARGUMENT_1(MESSAGE, PARAM1)
Macro used to throw a catapult invalid argument with a single parameter.
Definition: exceptions.h:183
std::vector< std::unique_ptr< ExternalCacheStorage > > m_storages
Definition: ExternalCacheStorageBuilder.h:54
Builder for creating an aggregate external cache storage around external cache storages.
Definition: ExternalCacheStorageBuilder.h:28
Definition: AddressExtractionExtension.cpp:28
void add(std::unique_ptr< TStorage > &&pStorage)
Adds pStorage to the builder.
Definition: ExternalCacheStorageBuilder.h:32