mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Move NodeStore and backends to ripple_core
This commit is contained in:
77
modules/ripple_core/node/NullBackendFactory.cpp
Normal file
77
modules/ripple_core/node/NullBackendFactory.cpp
Normal file
@@ -0,0 +1,77 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (c) 2011-2013, OpenCoin, Inc.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
class NullBackendFactory::Backend : public NodeStore::Backend
|
||||
{
|
||||
public:
|
||||
Backend ()
|
||||
{
|
||||
}
|
||||
|
||||
~Backend ()
|
||||
{
|
||||
}
|
||||
|
||||
std::string getName()
|
||||
{
|
||||
return std::string ();
|
||||
}
|
||||
|
||||
Status fetch (void const*, NodeObject::Ptr*)
|
||||
{
|
||||
return notFound;
|
||||
}
|
||||
|
||||
void store (NodeObject::ref object)
|
||||
{
|
||||
}
|
||||
|
||||
void storeBatch (NodeStore::Batch const& batch)
|
||||
{
|
||||
}
|
||||
|
||||
void visitAll (VisitCallback& callback)
|
||||
{
|
||||
}
|
||||
|
||||
int getWriteLoad ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
NullBackendFactory::NullBackendFactory ()
|
||||
{
|
||||
}
|
||||
|
||||
NullBackendFactory::~NullBackendFactory ()
|
||||
{
|
||||
}
|
||||
|
||||
NullBackendFactory& NullBackendFactory::getInstance ()
|
||||
{
|
||||
static NullBackendFactory instance;
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
String NullBackendFactory::getName () const
|
||||
{
|
||||
return "none";
|
||||
}
|
||||
|
||||
NodeStore::Backend* NullBackendFactory::createInstance (
|
||||
size_t,
|
||||
StringPairArray const&,
|
||||
NodeStore::Scheduler&)
|
||||
{
|
||||
return new NullBackendFactory::Backend;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user