CatapultServer
v0.5.0.1 (Elephant)
extensions/mongo/src/CacheStorageInclude.h
Go to the documentation of this file.
1
21
#pragma once
22
#include "
ExternalCacheStorage.h
"
23
#include "
catapult/model/NetworkInfo.h
"
24
#include <memory>
25
26
namespace
catapult
{
namespace
mongo {
class
MongoStorageContext; } }
27
29
#define DECLARE_MONGO_CACHE_STORAGE(NAME) \
30
std::unique_ptr<mongo::ExternalCacheStorage> CreateMongo##NAME##CacheStorage( \
31
mongo::MongoStorageContext& storageContext, \
32
model::NetworkIdentifier networkIdentifier) \
33
34
#define DEFINE_MONGO_CACHE_STORAGE(NAME, STORAGE_TYPE, TRAITS_NAME) \
36
DECLARE_MONGO_CACHE_STORAGE(NAME) { \
37
return std::make_unique<storages::STORAGE_TYPE<TRAITS_NAME>>(storageContext, networkIdentifier); \
38
}
39
41
#define DEFINE_MONGO_FLAT_CACHE_STORAGE(NAME, TRAITS_NAME) \
42
DEFINE_MONGO_CACHE_STORAGE(NAME, MongoFlatCacheStorage, TRAITS_NAME)
43
45
#define DEFINE_MONGO_HISTORICAL_CACHE_STORAGE(NAME, TRAITS_NAME) \
46
DEFINE_MONGO_CACHE_STORAGE(NAME, MongoHistoricalCacheStorage, TRAITS_NAME)
NetworkInfo.h
ExternalCacheStorage.h
catapult
Definition:
AddressExtractionExtension.cpp:28
catapult-server
extensions
mongo
src
CacheStorageInclude.h
Generated by
1.8.16