Add memory backend for node store

This commit is contained in:
Vinnie Falco
2013-07-23 14:53:48 -07:00
parent edcead521b
commit a3264a291a
13 changed files with 206 additions and 40 deletions

View File

@@ -0,0 +1,32 @@
//------------------------------------------------------------------------------
/*
Copyright (c) 2011-2013, OpenCoin, Inc.
*/
//==============================================================================
#ifndef RIPPLE_MEMORYBACKENDFACTORY_H_INCLUDED
#define RIPPLE_MEMORYBACKENDFACTORY_H_INCLUDED
/** Factory to produce a RAM based backend for the NodeStore.
@see NodeStore
*/
class MemoryBackendFactory : public NodeStore::BackendFactory
{
private:
class Backend;
MemoryBackendFactory ();
~MemoryBackendFactory ();
public:
static MemoryBackendFactory& getInstance ();
String getName () const;
NodeStore::Backend* createInstance (size_t keyBytes,
StringPairArray const& keyValues,
NodeStore::Scheduler& scheduler);
};
#endif