rippled
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
ripple::NodeStore Namespace Reference

Namespaces

 detail
 
 tests
 

Classes

class  Backend
 A backend used for the NodeStore. More...
 
class  Backend_test
 
class  BatchWriter
 Batch-writing assist logic. More...
 
struct  BatchWriteReport
 Contains information about a batch write operation. More...
 
class  Database
 Persistency layer for NodeObject. More...
 
class  Database_test
 
class  DatabaseNodeImp
 
class  DatabaseRotating
 
class  DatabaseRotatingImp
 
class  DatabaseShard
 A collection of historical shards. More...
 
class  DatabaseShard_test
 
class  DatabaseShardImp
 
class  DecodedBlob
 Parsed key/value blob into NodeObject components. More...
 
class  DeterministicShard
 DeterministicShard class. More...
 
class  DummyScheduler
 Simple NodeStore Scheduler that just peforms the tasks synchronously. More...
 
class  EncodedBlob
 Convert a NodeObject from in-memory to database format. More...
 
class  Factory
 Base class for backend factories. More...
 
struct  FetchReport
 Contains information about a fetch operation. More...
 
struct  LessThan
 Binary function that satisfies the strict-weak-ordering requirement. More...
 
class  Manager
 Singleton for managing NodeStore factories and back ends. More...
 
class  ManagerImp
 
class  MemoryBackend
 
struct  MemoryDB
 
class  MemoryFactory
 
class  NodeStoreBasic_test
 
class  NuDBBackend
 
class  NuDBFactory
 
class  NullBackend
 
class  NullFactory
 
class  progress
 
class  Scheduler
 Scheduling for asynchronous backend activity. More...
 
class  Sequence
 
class  Shard
 
class  ShardInfo
 
struct  Task
 Derived classes perform scheduled tasks. More...
 
class  TaskQueue
 
class  TestBase
 
class  Timing_test
 
struct  uniformIntDistribution
 std::uniform_int_distribution is platform dependent. More...
 
struct  varint_traits
 
struct  varint_traits< T, true >
 

Typedefs

using PCache = TaggedCache< uint256, NodeObject >
 
using NCache = KeyCache
 
using Batch = std::vector< std::shared_ptr< NodeObject > >
 A batch of NodeObjects to write at once. More...
 

Enumerations

enum  FetchType { FetchType::synchronous, FetchType::async }
 
enum  { batchWritePreallocationSize = 256, batchWriteLimitSize = 65536 }
 
enum  Status {
  ok, notFound, dataCorrupt, unknown,
  backendError, customCode = 100
}
 Return codes from Backend operations. More...
 

Functions

std::unique_ptr< DatabaseShardmake_ShardStore (Application &app, Scheduler &scheduler, int readThreads, beast::Journal j)
 
template<class BufferFactory >
std::pair< void const *, std::size_tlz4_decompress (void const *in, std::size_t in_size, BufferFactory &&bf)
 
template<class BufferFactory >
std::pair< void const *, std::size_tlz4_compress (void const *in, std::size_t in_size, BufferFactory &&bf)
 
template<class BufferFactory >
std::pair< void const *, std::size_tnodeobject_decompress (void const *in, std::size_t in_size, BufferFactory &&bf)
 
template<class = void>
void const * zero32 ()
 
template<class BufferFactory >
std::pair< void const *, std::size_tnodeobject_compress (void const *in, std::size_t in_size, BufferFactory &&bf)
 
template<class = void>
void filter_inner (void *in, std::size_t in_size)
 
std::shared_ptr< DeterministicShardmake_DeterministicShard (Application &app, boost::filesystem::path const &shardDir, std::uint32_t shardIndex, Serializer const &finalKey, beast::Journal j)
 Creates shared pointer to deterministic shard and initializes it. More...
 
template<class = void>
std::size_t read_varint (void const *buf, std::size_t buflen, std::size_t &t)
 
template<class T , std::enable_if_t< std::is_unsigned< T >::value > * = nullptr>
std::size_t size_varint (T v)
 
template<class = void>
std::size_t write_varint (void *p0, std::size_t v)
 
template<class T , std::enable_if_t< std::is_same< T, varint >::value > * = nullptr>
void read (nudb::detail::istream &is, std::size_t &u)
 
template<class T , std::enable_if_t< std::is_same< T, varint >::value > * = nullptr>
void write (nudb::detail::ostream &os, std::size_t t)
 
 BEAST_DEFINE_TESTSUITE (Backend, ripple_core, ripple)
 
 BEAST_DEFINE_TESTSUITE (NodeStoreBasic, ripple_core, ripple)
 
 BEAST_DEFINE_TESTSUITE (Database, NodeStore, ripple)
 
template<class Engine , class Integral >
Integral randInt (Engine &engine, Integral min, Integral max)
 
template<class Engine , class Integral >
Integral randInt (Engine &engine, Integral max)
 
 BEAST_DEFINE_TESTSUITE_MANUAL (DatabaseShard, NodeStore, ripple)
 
std::map< std::string, std::string, boost::beast::iless > parse_args (std::string const &s)
 
bool isSame (std::shared_ptr< NodeObject > const &lhs, std::shared_ptr< NodeObject > const &rhs)
 Returns true if objects are identical. More...
 
std::unique_ptr< Backendmake_Backend (Section const &config, Scheduler &scheduler, beast::Journal journal)
 
template<class Generator >
static void rngcpy (void *buffer, std::size_t bytes, Generator &g)
 
 BEAST_DEFINE_TESTSUITE_MANUAL_PRIO (Timing, NodeStore, ripple, 1)
 

Variables

static MemoryFactory memoryFactory
 
static NuDBFactory nuDBFactory
 
static NullFactory nullFactory
 

Typedef Documentation

◆ PCache

Definition at line 43 of file nodestore/impl/Shard.h.

◆ NCache

Definition at line 44 of file nodestore/impl/Shard.h.

◆ Batch

A batch of NodeObjects to write at once.

Definition at line 55 of file nodestore/Types.h.

Enumeration Type Documentation

◆ FetchType

Enumerator
synchronous 
async 

Definition at line 29 of file ripple/nodestore/Scheduler.h.

◆ anonymous enum

anonymous enum
Enumerator
batchWritePreallocationSize 
batchWriteLimitSize 

Definition at line 30 of file nodestore/Types.h.

◆ Status

Return codes from Backend operations.

Enumerator
ok 
notFound 
dataCorrupt 
unknown 
backendError 
customCode 

Definition at line 44 of file nodestore/Types.h.

Function Documentation

◆ make_ShardStore()

std::unique_ptr< DatabaseShard > ripple::NodeStore::make_ShardStore ( Application app,
Scheduler scheduler,
int  readThreads,
beast::Journal  j 
)

Definition at line 2236 of file DatabaseShardImp.cpp.

◆ lz4_decompress()

template<class BufferFactory >
std::pair<void const*, std::size_t> ripple::NodeStore::lz4_decompress ( void const *  in,
std::size_t  in_size,
BufferFactory &&  bf 
)

Definition at line 43 of file codec.h.

◆ lz4_compress()

template<class BufferFactory >
std::pair<void const*, std::size_t> ripple::NodeStore::lz4_compress ( void const *  in,
std::size_t  in_size,
BufferFactory &&  bf 
)

Definition at line 73 of file codec.h.

◆ nodeobject_decompress()

template<class BufferFactory >
std::pair<void const*, std::size_t> ripple::NodeStore::nodeobject_decompress ( void const *  in,
std::size_t  in_size,
BufferFactory &&  bf 
)

Definition at line 108 of file codec.h.

◆ zero32()

template<class = void>
void const* ripple::NodeStore::zero32 ( )

Definition at line 211 of file codec.h.

◆ nodeobject_compress()

template<class BufferFactory >
std::pair<void const*, std::size_t> ripple::NodeStore::nodeobject_compress ( void const *  in,
std::size_t  in_size,
BufferFactory &&  bf 
)

Definition at line 219 of file codec.h.

◆ filter_inner()

template<class = void>
void ripple::NodeStore::filter_inner ( void *  in,
std::size_t  in_size 
)

Definition at line 315 of file codec.h.

◆ make_DeterministicShard()

std::shared_ptr< DeterministicShard > ripple::NodeStore::make_DeterministicShard ( Application app,
boost::filesystem::path const &  shardDir,
std::uint32_t  shardIndex,
Serializer const &  finalKey,
beast::Journal  j 
)

Creates shared pointer to deterministic shard and initializes it.

Parameters
appApplication object
shardDirDirectory where shard is located
shardIndexIndex of the shard
finalKeySerializer of shard's ginal key which consists of: shard version (32 bit) first ledger sequence in the shard (32 bit) last ledger sequence in the shard (32 bit) hash of last ledger (256 bits)
jJournal to logging
Returns
Shared pointer to deterministic shard or {} in case of error.

Definition at line 151 of file DeterministicShard.cpp.

◆ read_varint()

template<class = void>
std::size_t ripple::NodeStore::read_varint ( void const *  buf,
std::size_t  buflen,
std::size_t t 
)

Definition at line 56 of file varint.h.

◆ size_varint()

template<class T , std::enable_if_t< std::is_unsigned< T >::value > * = nullptr>
std::size_t ripple::NodeStore::size_varint ( v)

Definition at line 89 of file varint.h.

◆ write_varint()

template<class = void>
std::size_t ripple::NodeStore::write_varint ( void *  p0,
std::size_t  v 
)

Definition at line 102 of file varint.h.

◆ read()

template<class T , std::enable_if_t< std::is_same< T, varint >::value > * = nullptr>
void ripple::NodeStore::read ( nudb::detail::istream &  is,
std::size_t u 
)

Definition at line 120 of file varint.h.

◆ write()

template<class T , std::enable_if_t< std::is_same< T, varint >::value > * = nullptr>
void ripple::NodeStore::write ( nudb::detail::ostream &  os,
std::size_t  t 
)

Definition at line 133 of file varint.h.

◆ BEAST_DEFINE_TESTSUITE() [1/3]

ripple::NodeStore::BEAST_DEFINE_TESTSUITE ( Backend  ,
ripple_core  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [2/3]

ripple::NodeStore::BEAST_DEFINE_TESTSUITE ( NodeStoreBasic  ,
ripple_core  ,
ripple   
)

◆ BEAST_DEFINE_TESTSUITE() [3/3]

ripple::NodeStore::BEAST_DEFINE_TESTSUITE ( Database  ,
NodeStore  ,
ripple   
)

◆ randInt() [1/2]

template<class Engine , class Integral >
Integral ripple::NodeStore::randInt ( Engine &  engine,
Integral  min,
Integral  max 
)

Definition at line 149 of file DatabaseShard_test.cpp.

◆ randInt() [2/2]

template<class Engine , class Integral >
Integral ripple::NodeStore::randInt ( Engine &  engine,
Integral  max 
)

Definition at line 161 of file DatabaseShard_test.cpp.

◆ BEAST_DEFINE_TESTSUITE_MANUAL()

ripple::NodeStore::BEAST_DEFINE_TESTSUITE_MANUAL ( DatabaseShard  ,
NodeStore  ,
ripple   
)

◆ parse_args()

std::map<std::string, std::string, boost::beast::iless> ripple::NodeStore::parse_args ( std::string const &  s)

Definition at line 249 of file import_test.cpp.

◆ isSame()

bool ripple::NodeStore::isSame ( std::shared_ptr< NodeObject > const &  lhs,
std::shared_ptr< NodeObject > const &  rhs 
)

Returns true if objects are identical.

Definition at line 57 of file TestBase.h.

◆ make_Backend()

std::unique_ptr<Backend> ripple::NodeStore::make_Backend ( Section const &  config,
Scheduler scheduler,
beast::Journal  journal 
)

Definition at line 53 of file Timing_test.cpp.

◆ rngcpy()

template<class Generator >
static void ripple::NodeStore::rngcpy ( void *  buffer,
std::size_t  bytes,
Generator &  g 
)
static

Definition at line 65 of file Timing_test.cpp.

◆ BEAST_DEFINE_TESTSUITE_MANUAL_PRIO()

ripple::NodeStore::BEAST_DEFINE_TESTSUITE_MANUAL_PRIO ( Timing  ,
NodeStore  ,
ripple  ,
 
)

Variable Documentation

◆ memoryFactory

MemoryFactory ripple::NodeStore::memoryFactory
static

Definition at line 75 of file MemoryFactory.cpp.

◆ nuDBFactory

NuDBFactory ripple::NodeStore::nuDBFactory
static

Definition at line 414 of file NuDBFactory.cpp.

◆ nullFactory

NullFactory ripple::NodeStore::nullFactory
static

Definition at line 143 of file NullFactory.cpp.