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