xrpld
Loading...
Searching...
No Matches
include
xrpl
nodestore
nodestore/Types.h
1
#pragma once
2
3
#include <xrpl/nodestore/NodeObject.h>
4
5
#include <
vector
>
6
7
namespace
xrpl::NodeStore
{
8
9
// This is only used to pre-allocate the array for
10
// batch objects and does not affect the amount written.
11
//
12
static
constexpr
auto
kBatchWritePreallocationSize
= 256;
13
14
// This sets a limit on the maximum number of writes
15
// in a batch. Actual usage can be twice this since
16
// we have a new batch growing as we write the old.
17
//
18
static
constexpr
auto
kBatchWriteLimitSize
= 65536;
19
21
enum class
Status
{
22
Ok
= 0,
23
NotFound
= 1,
24
DataCorrupt
= 2,
25
Unknown
= 3,
26
BackendError
= 4,
27
28
CustomCode
= 100
29
};
30
32
using
Batch
=
std::vector<std::shared_ptr<NodeObject>
>;
33
34
}
// namespace xrpl::NodeStore
xrpl::NodeStore
Definition
ServiceRegistry.h:12
xrpl::NodeStore::kBatchWriteLimitSize
static constexpr auto kBatchWriteLimitSize
Definition
nodestore/Types.h:18
xrpl::NodeStore::Status
Status
Return codes from Backend operations.
Definition
nodestore/Types.h:21
xrpl::NodeStore::Status::NotFound
@ NotFound
Definition
nodestore/Types.h:23
xrpl::NodeStore::Status::BackendError
@ BackendError
Definition
nodestore/Types.h:26
xrpl::NodeStore::Status::Unknown
@ Unknown
Definition
nodestore/Types.h:25
xrpl::NodeStore::Status::Ok
@ Ok
Definition
nodestore/Types.h:22
xrpl::NodeStore::Status::DataCorrupt
@ DataCorrupt
Definition
nodestore/Types.h:24
xrpl::NodeStore::Status::CustomCode
@ CustomCode
Definition
nodestore/Types.h:28
xrpl::NodeStore::kBatchWritePreallocationSize
static constexpr auto kBatchWritePreallocationSize
Definition
nodestore/Types.h:12
xrpl::NodeStore::Batch
std::vector< std::shared_ptr< NodeObject > > Batch
A batch of NodeObjects to write at once.
Definition
nodestore/Types.h:32
vector
Generated by
1.16.1