hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
HCE::VoldemortDB Class Reference

class VoldemortDB More...

#include <Voldemort.hpp>

Inheritance diagram for HCE::VoldemortDB:
Collaboration diagram for HCE::VoldemortDB:

Public Member Functions

 VoldemortDB ()
virtual ~VoldemortDB ()
void setDatabaseName (const std::string &)
 set the database name
void put (const std::string &key, const std::string &value)
 put document with given ID to Search Engine
virtual std::string get (const std::string &key)
 get document with given ID from Search Engine
virtual std::vector< std::string > get_all ()
 get all documents with given ID from Search Engine
virtual void del (const std::string &key)
 delete document with given ID from Search Engine
int getLastError () const
 get status last performed operation. Must be called after method to get operation's status
- Public Member Functions inherited from HCE::BaseDB
 BaseDB ()
virtual ~BaseDB ()
virtual void setDriverUrl (const std::string &dbUrl)
 set the driver URL
void setWriteUnique (const bool writeUnique)
void setWritePolicy (const bool writePolicy)
const bool getWriteUnique () const
const bool getWritePolicy () const

Additional Inherited Members

- Public Types inherited from HCE::BaseDB
typedef Poco::SharedPtr
< HCE::BaseDB
BaseDBPtr
- Protected Attributes inherited from HCE::BaseDB
std::string _dbName
std::list< std::string > _bootstrapUrls
STATUS _error
bool _writeUnique
bool _writePolicy

Detailed Description

class VoldemortDB

Definition at line 46 of file Voldemort.hpp.

Constructor & Destructor Documentation

HCE::VoldemortDB::VoldemortDB ( )
virtual HCE::VoldemortDB::~VoldemortDB ( )
virtual

Member Function Documentation

virtual void HCE::VoldemortDB::del ( const std::string &  key)
virtual

delete document with given ID from Search Engine

A pure virtual member.

Parameters
keythe document's ID method must set _error to operation's result state: ACTION_SUCCESS - operation was completed successfully ACTION_GENERAL_FAILURE - operation was failed
Returns
document's content

Implements HCE::BaseDB.

virtual std::string HCE::VoldemortDB::get ( const std::string &  key)
virtual

get document with given ID from Search Engine

A pure virtual member.

Parameters
keythe document's ID method must set _error to operation's result state: DOCUMENT_PRESENT - operation was completed successfully (document was present) DOCUMENT_NOT_PRESENT - operation was failed (document wasn't present)
Returns
document's content

Implements HCE::BaseDB.

virtual std::vector<std::string> HCE::VoldemortDB::get_all ( )
virtual

get all documents with given ID from Search Engine

A pure virtual member.

Parameters
keythe document's ID method must set _error to operation's result state: DOCUMENT_PRESENT - operation was completed successfully (document was present) DOCUMENT_NOT_PRESENT - operation was failed (document wasn't present)
Returns
document's content

Implements HCE::BaseDB.

int HCE::VoldemortDB::getLastError ( ) const
inlinevirtual

get status last performed operation. Must be called after method to get operation's status

A pure virtual member.

Returns
operation's status

Implements HCE::BaseDB.

Definition at line 57 of file Voldemort.hpp.

void HCE::VoldemortDB::put ( const std::string &  key,
const std::string &  value 
)
virtual

put document with given ID to Search Engine

A pure virtual member.

Parameters
keythe document's ID
valuethe document itself method must set _error to operation's result state: ACTION_SUCCESS - operation was completed successfully ACTION_GENERAL_FAILURE - operation was failed

Implements HCE::BaseDB.

void HCE::VoldemortDB::setDatabaseName ( const std::string &  dbName)
virtual

set the database name

Parameters
dbNamethe database name

Reimplemented from HCE::BaseDB.


The documentation for this class was generated from the following file: