|
LogCabin
|
Encapsulates how LogCabin lays out the filesystem, and it handles locking of the storage directory. More...
#include <Layout.h>
Public Member Functions | |
| Layout () | |
| Default constructor. Call some init method next. | |
| Layout (Layout &&other) | |
| Move constructor. | |
| ~Layout () | |
| Destructor. | |
| Layout & | operator= (Layout &&other) |
| Move assignment. | |
| void | init (const Core::Config &config, uint64_t serverId) |
| Initialize in the normal way for a LogCabin server. | |
| void | init (const std::string &storagePath, uint64_t serverId) |
| Initialize with a particular storagePath. | |
| void | initTemporary (uint64_t serverId=1) |
| Initialize for unit tests. | |
Public Attributes | |
| FilesystemUtil::File | topDir |
| Contains all files. | |
| FilesystemUtil::File | serverDir |
| Contains all files for this particular server. | |
| FilesystemUtil::File | lockFile |
| Used to ensure only one process accesses serverDir at a time. | |
| FilesystemUtil::File | logDir |
| Contains all log files for this particular server. | |
| FilesystemUtil::File | snapshotDir |
| Contains all snapshot files for this particular server. | |
Private Member Functions | |
| Layout (const Layout &other) | |
| Layout & | operator= (const Layout &other) |
Private Attributes | |
| bool | removeAllFiles |
| If true, rm -rf topDir when destroying this class. | |
Encapsulates how LogCabin lays out the filesystem, and it handles locking of the storage directory.
The current filesystem layout looks like this:
/ - topDir, defined by config option 'storagePath' "server%lu" % serverId/ - serverDir log/ - logDir, Storage::Log implementation-defined snapshot/ - snapshotDir, contains snapshots snapshot - latest complete snapshot "partial.%010lu.%06lu" % (seconds, micro) - in progress lock - lockFile, ensures only 1 process accesses serverDir a time
| LogCabin::Storage::Layout::Layout | ( | Layout && | other | ) |
| LogCabin::Storage::Layout::Layout | ( | const Layout & | other | ) | [private] |
| void LogCabin::Storage::Layout::init | ( | const Core::Config & | config, |
| uint64_t | serverId | ||
| ) |
| void LogCabin::Storage::Layout::init | ( | const std::string & | storagePath, |
| uint64_t | serverId | ||
| ) |
| void LogCabin::Storage::Layout::initTemporary | ( | uint64_t | serverId = 1 | ) |
bool LogCabin::Storage::Layout::removeAllFiles [private] |
1.7.6.1