|
CatapultServer
v0.5.0.1 (Elephant)
|
Classes | |
| class | BlockChangeSubscriber |
| Block change subscriber. More... | |
| class | BlockStorage |
| Interface for saving and loading blocks. More... | |
| class | BlockStorageCache |
| class | BlockStorageModifier |
| A write only view on top of block storage. More... | |
| class | BlockStorageView |
| A read only view on top of block storage. More... | |
| class | BufferedInputFileStream |
| Provides a buffered input stream around raw file. More... | |
| class | BufferedOutputFileStream |
| Provides a buffered output stream around raw file. More... | |
| class | BufferInputStreamAdapter |
| Adapt a typed buffer to be used as an input stream. More... | |
| struct | CachedData |
| class | FileBlockStorage |
| File-based block storage. More... | |
| class | FileLock |
| Lock based on an underlying lock file. More... | |
| class | FileQueueReader |
| File based queue reader where each message is represented by a file (with incrementing names) in a directory. More... | |
| class | FileQueueWriter |
| class | IndexFile |
| Index file containing a uint64_t value. More... | |
| class | InputStream |
| Reader interface. More... | |
| class | LightBlockStorage |
| Minimalistic interface for block storage (does not allow block loading). More... | |
| class | OutputStream |
| Writer interface. More... | |
| class | PrunableBlockStorage |
| Interface that allows saving, loading and pruning blocks. More... | |
| class | RawFile |
| Wrapper for low-level i/o operations on files. More... | |
| struct | SizeCalculatingOutputStream |
| Stream implementation for calculating the stream size. More... | |
| class | StringOutputStream |
| String output stream. More... | |
Typedefs | |
| using | FdType = FileLock::FdType |
Enumerations | |
| enum | FileBlockStorageMode { FileBlockStorageMode::Hash_Index, FileBlockStorageMode::None } |
| File block storage modes. More... | |
| enum | OpenMode { OpenMode::Read_Only, OpenMode::Read_Write, OpenMode::Read_Append } |
| Defines mode of opening the file. More... | |
| enum | LockMode { LockMode::None, LockMode::File } |
| Defines locking mode for the file. More... | |
Functions | |
| std::unique_ptr< BlockStorage > | CreateAggregateBlockStorage (std::unique_ptr< BlockStorage > &&pStorage, std::unique_ptr< BlockChangeSubscriber > &&pBlockChangeSubscriber) |
| Creates an aggregate block storage that delegates to pStorage and publishes block changes to pBlockChangeSubscriber. More... | |
| void | WriteBlockElement (const model::BlockElement &blockElement, OutputStream &outputStream) |
| Writes blockElement into outputStream. More... | |
| std::shared_ptr< model::BlockElement > | ReadBlockElement (InputStream &inputStream) |
| void | WriteBlockStatement (const model::BlockStatement &blockStatement, OutputStream &outputStream) |
| Writes blockStatement into outputStream. More... | |
| void | ReadBlockStatement (InputStream &inputStream, model::BlockStatement &blockStatement) |
| Reads block statement from inputStream into blockStatement. More... | |
| std::unique_ptr< BlockChangeSubscriber > | CreateBlockStorageChangeSubscriber (std::unique_ptr< LightBlockStorage > &&pStorage) |
| Creates a block change subscriber around a block storage (pStorage). More... | |
| template<typename TIo > | |
| void | WriteEntity (TIo &output, const model::SizePrefixedEntity &entity) |
| Writes size prefixed entity into output. More... | |
| template<typename TEntity , typename TIo > | |
| std::unique_ptr< TEntity > | ReadEntity (TIo &input) |
| Reads size prefixed entity from input. More... | |
| void | PurgeDirectory (const std::string &directory) |
| Deletes everything in directory but does not delete the directory itself. More... | |
| void | MoveBlockFiles (PrunableBlockStorage &sourceStorage, BlockStorage &destinationStorage, Height startHeight) |
| Moves block files starting at startHeight from sourceStorage to destinationStorage. More... | |
| template<typename TIo , typename TValue , typename TTag , typename TBaseValue > | |
| void | Write (TIo &output, const utils::BasicBaseValue< TValue, TTag, TBaseValue > &value) |
| Writes base value into output. More... | |
| template<typename TIo > | |
| void | Write64 (TIo &output, uint64_t value) |
| Writes value into output. More... | |
| template<typename TIo > | |
| void | Write32 (TIo &output, uint32_t value) |
| Writes value into output. More... | |
| template<typename TIo > | |
| void | Write16 (TIo &output, uint16_t value) |
| Writes value into output. More... | |
| template<typename TIo > | |
| void | Write8 (TIo &output, uint8_t value) |
| Writes value into output. More... | |
| template<typename TIo , typename TValue , typename TTag , typename TBaseValue > | |
| void | Read (TIo &input, utils::BasicBaseValue< TValue, TTag, TBaseValue > &value) |
| Reads base value from input. More... | |
| template<typename TIo > | |
| auto | Read64 (TIo &input) |
| Reads value from input. More... | |
| template<typename TIo > | |
| auto | Read32 (TIo &input) |
| Reads value from input. More... | |
| template<typename TIo > | |
| auto | Read16 (TIo &input) |
| Reads value from input. More... | |
| template<typename TIo > | |
| auto | Read8 (TIo &input) |
| Reads value from input. More... | |
| template<typename TValue , typename TIo , typename X = std::enable_if_t<utils::traits::is_pod_v<TValue>>> | |
| TValue | Read (TIo &input) |
| Reads data of type TValue from input. More... | |
| void | WriteTransactionInfo (const model::TransactionInfo &transactionInfo, OutputStream &outputStream) |
| Writes transactionInfo into outputStream. More... | |
| void | ReadTransactionInfo (InputStream &inputStream, model::TransactionInfo &transactionInfo) |
| Reads transaction info from inputStream into transactionInfo. More... | |
| void | WriteTransactionInfos (const model::TransactionInfosSet &transactionInfos, OutputStream &outputStream) |
| Writes transactionInfos into outputStream. More... | |
| void | ReadTransactionInfos (InputStream &inputStream, model::TransactionInfosSet &transactionInfos) |
| Reads transaction infos from inputStream into transactionInfos. More... | |
Variables | |
| constexpr size_t | Default_Stream_Buffer_Size = 4096 |
| Default stream buffer size. More... | |
| using catapult::io::FdType = typedef FileLock::FdType |
|
strong |
|
strong |
|
strong |
| std::unique_ptr< BlockStorage > catapult::io::CreateAggregateBlockStorage | ( | std::unique_ptr< BlockStorage > && | pStorage, |
| std::unique_ptr< BlockChangeSubscriber > && | pBlockChangeSubscriber | ||
| ) |
Creates an aggregate block storage that delegates to pStorage and publishes block changes to pBlockChangeSubscriber.

| std::unique_ptr< BlockChangeSubscriber > catapult::io::CreateBlockStorageChangeSubscriber | ( | std::unique_ptr< LightBlockStorage > && | pStorage | ) |
Creates a block change subscriber around a block storage (pStorage).
| void catapult::io::MoveBlockFiles | ( | PrunableBlockStorage & | sourceStorage, |
| BlockStorage & | destinationStorage, | ||
| Height | startHeight | ||
| ) |
Moves block files starting at startHeight from sourceStorage to destinationStorage.


| void catapult::io::PurgeDirectory | ( | const std::string & | directory | ) |
Deletes everything in directory but does not delete the directory itself.

| TValue catapult::io::Read | ( | TIo & | input | ) |
Reads data of type TValue from input.

| void catapult::io::Read | ( | TIo & | input, |
| utils::BasicBaseValue< TValue, TTag, TBaseValue > & | value | ||
| ) |
Reads base value from input.

| auto catapult::io::Read16 | ( | TIo & | input | ) |
Reads value from input.

| auto catapult::io::Read32 | ( | TIo & | input | ) |
Reads value from input.

| auto catapult::io::Read64 | ( | TIo & | input | ) |
Reads value from input.

| auto catapult::io::Read8 | ( | TIo & | input | ) |
Reads value from input.

| std::shared_ptr< model::BlockElement > catapult::io::ReadBlockElement | ( | InputStream & | inputStream | ) |
Reads block element from inputStream into an allocated block element.

| void catapult::io::ReadBlockStatement | ( | InputStream & | inputStream, |
| model::BlockStatement & | blockStatement | ||
| ) |
Reads block statement from inputStream into blockStatement.

| std::unique_ptr<TEntity> catapult::io::ReadEntity | ( | TIo & | input | ) |
Reads size prefixed entity from input.

| void catapult::io::ReadTransactionInfo | ( | InputStream & | inputStream, |
| model::TransactionInfo & | transactionInfo | ||
| ) |
Reads transaction info from inputStream into transactionInfo.


| void catapult::io::ReadTransactionInfos | ( | InputStream & | inputStream, |
| model::TransactionInfosSet & | transactionInfos | ||
| ) |
Reads transaction infos from inputStream into transactionInfos.


| void catapult::io::Write | ( | TIo & | output, |
| const utils::BasicBaseValue< TValue, TTag, TBaseValue > & | value | ||
| ) |
Writes base value into output.

| void catapult::io::Write16 | ( | TIo & | output, |
| uint16_t | value | ||
| ) |
Writes value into output.

| void catapult::io::Write32 | ( | TIo & | output, |
| uint32_t | value | ||
| ) |
Writes value into output.

| void catapult::io::Write64 | ( | TIo & | output, |
| uint64_t | value | ||
| ) |
Writes value into output.

| void catapult::io::Write8 | ( | TIo & | output, |
| uint8_t | value | ||
| ) |
Writes value into output.

| void catapult::io::WriteBlockElement | ( | const model::BlockElement & | blockElement, |
| OutputStream & | outputStream | ||
| ) |
Writes blockElement into outputStream.


| void catapult::io::WriteBlockStatement | ( | const model::BlockStatement & | blockStatement, |
| OutputStream & | outputStream | ||
| ) |
Writes blockStatement into outputStream.

| void catapult::io::WriteEntity | ( | TIo & | output, |
| const model::SizePrefixedEntity & | entity | ||
| ) |
Writes size prefixed entity into output.

| void catapult::io::WriteTransactionInfo | ( | const model::TransactionInfo & | transactionInfo, |
| OutputStream & | outputStream | ||
| ) |
Writes transactionInfo into outputStream.


| void catapult::io::WriteTransactionInfos | ( | const model::TransactionInfosSet & | transactionInfos, |
| OutputStream & | outputStream | ||
| ) |
Writes transactionInfos into outputStream.

|
constexpr |
Default stream buffer size.