CatapultServer  v0.5.0.1 (Elephant)
CacheConfiguration.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include <string>
24 
25 namespace catapult { namespace cache {
26 
30  Disabled,
31 
33  Enabled
34  };
35 
38  public:
41  : ShouldUseCacheDatabase(false)
43  {}
44 
48  const std::string& databaseDirectory,
49  utils::FileSize maxCacheDatabaseWriteBatchSize,
52  , CacheDatabaseDirectory(databaseDirectory)
53  , MaxCacheDatabaseWriteBatchSize(maxCacheDatabaseWriteBatchSize)
55  {}
56 
57  public:
60 
63 
66 
69  };
70 }}
catapult::cache::CacheConfiguration::CacheConfiguration
CacheConfiguration(const std::string &databaseDirectory, utils::FileSize maxCacheDatabaseWriteBatchSize, PatriciaTreeStorageMode mode)
Definition: CacheConfiguration.h:47
catapult::cache::PatriciaTreeStorageMode::Enabled
Patricia tree storage should be enabled.
catapult::cache::CacheConfiguration::ShouldUseCacheDatabase
bool ShouldUseCacheDatabase
true if a cache database should be used, false otherwise.
Definition: CacheConfiguration.h:59
FileSize.h
catapult::cache::CacheConfiguration::MaxCacheDatabaseWriteBatchSize
utils::FileSize MaxCacheDatabaseWriteBatchSize
Maximum size of database write batch.
Definition: CacheConfiguration.h:65
catapult::utils::FileSize
Represents a file size.
Definition: FileSize.h:29
catapult::cache::CacheConfiguration::CacheDatabaseDirectory
std::string CacheDatabaseDirectory
Base directory to use for storing cache database.
Definition: CacheConfiguration.h:62
catapult::cache::PatriciaTreeStorageMode
PatriciaTreeStorageMode
Possible patricia tree storage modes.
Definition: CacheConfiguration.h:28
catapult::cache::CacheConfiguration
Cache configuration.
Definition: CacheConfiguration.h:37
catapult::cache::CacheConfiguration::CacheConfiguration
CacheConfiguration()
Creates a default cache configuration.
Definition: CacheConfiguration.h:40
catapult::cache::PatriciaTreeStorageMode::Disabled
Patricia tree storage should be disabled.
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::cache::CacheConfiguration::ShouldStorePatriciaTrees
bool ShouldStorePatriciaTrees
true if patricia trees should be stored, false otherwise.
Definition: CacheConfiguration.h:68