libmoost
moost::kvds::KvdsBdb< dbtypeT > Class Template Reference

*** This class is NOT thread safe *** More...

#include <kvds_bdb_linux.hpp>

List of all members.

Public Types

typedef boost::shared_ptr< Db > store_type

Public Member Functions

 KvdsBdb ()
 ~KvdsBdb ()
void open (char const dsname[], bool newdb=false)
void save ()
void close ()
store_typeget_store ()
bool put (void const *pkey, size_t const ksize, void const *pval, size_t const vsize)
bool get (void const *pkey, size_t const ksize, void *pval, size_t &vsize)
bool add (void const *pkey, size_t const ksize, void const *pval, size_t const vsize)
bool all (void const *pkey, size_t const ksize, void *pval, size_t &vsize)
bool xst (void const *pkey, size_t const ksize)
bool del (void const *pkey, size_t const ksize)
bool clr ()
bool beg ()
bool nxt (void *pkey, size_t &ksize)
bool end ()
bool siz (void const *pkey, size_t const ksize, size_t &vsize)
bool cnt (boost::uint64_t &cnt)
bool nil (bool &isnil)
template<>
bool cnt (boost::uint64_t &cnt)
template<>
bool cnt (boost::uint64_t &cnt)

Private Member Functions

void assert_data_store_open () const
void set_next_itr ()
int get (Dbt &kt, Dbt &vt)

Private Attributes

store_type pdb_
Dbc * pitr_

Detailed Description

template<DBTYPE dbtypeT>
class moost::kvds::KvdsBdb< dbtypeT >

*** This class is NOT thread safe ***

Only HASH and BTREE are supported, trying to use another type will generate a link error

Definition at line 142 of file kvds_bdb_linux.hpp.


Member Typedef Documentation

template<DBTYPE dbtypeT>
typedef boost::shared_ptr<Db> moost::kvds::KvdsBdb< dbtypeT >::store_type

Definition at line 145 of file kvds_bdb_linux.hpp.


Constructor & Destructor Documentation

template<DBTYPE dbtypeT>
moost::kvds::KvdsBdb< dbtypeT >::KvdsBdb ( ) [inline]

Definition at line 147 of file kvds_bdb_linux.hpp.

template<DBTYPE dbtypeT>
moost::kvds::KvdsBdb< dbtypeT >::~KvdsBdb ( ) [inline]

Definition at line 151 of file kvds_bdb_linux.hpp.

Here is the call graph for this function:


Member Function Documentation

template<DBTYPE dbtypeT>
bool moost::kvds::KvdsBdb< dbtypeT >::add ( void const *  pkey,
size_t const  ksize,
void const *  pval,
size_t const  vsize 
) [inline]

Create abuffer big enough for exists + new

Definition at line 278 of file kvds_bdb_linux.hpp.

Here is the call graph for this function:

template<DBTYPE dbtypeT>
bool moost::kvds::KvdsBdb< dbtypeT >::all ( void const *  pkey,
size_t const  ksize,
void *  pval,
size_t &  vsize 
) [inline]

Definition at line 337 of file kvds_bdb_linux.hpp.

Here is the call graph for this function:

template<DBTYPE dbtypeT>
void moost::kvds::KvdsBdb< dbtypeT >::assert_data_store_open ( ) const [inline, private]

Definition at line 201 of file kvds_bdb_linux.hpp.

Here is the caller graph for this function:

template<DBTYPE dbtypeT>
bool moost::kvds::KvdsBdb< dbtypeT >::beg ( ) [inline]

Definition at line 409 of file kvds_bdb_linux.hpp.

Here is the call graph for this function:

template<DBTYPE dbtypeT>
void moost::kvds::KvdsBdb< dbtypeT >::close ( ) [inline]

Definition at line 176 of file kvds_bdb_linux.hpp.

Here is the caller graph for this function:

template<DBTYPE dbtypeT>
bool moost::kvds::KvdsBdb< dbtypeT >::clr ( ) [inline]

Definition at line 395 of file kvds_bdb_linux.hpp.

Here is the call graph for this function:

template<DBTYPE dbtypeT>
bool moost::kvds::KvdsBdb< dbtypeT >::cnt ( boost::uint64_t &  cnt)

Here is the caller graph for this function:

template<>
bool moost::kvds::KvdsBdb< DB_HASH >::cnt ( boost::uint64_t &  cnt) [inline]

Definition at line 514 of file kvds_bdb_linux.hpp.

template<>
bool moost::kvds::KvdsBdb< DB_BTREE >::cnt ( boost::uint64_t &  cnt) [inline]

Definition at line 532 of file kvds_bdb_linux.hpp.

template<DBTYPE dbtypeT>
bool moost::kvds::KvdsBdb< dbtypeT >::del ( void const *  pkey,
size_t const  ksize 
) [inline]

Definition at line 380 of file kvds_bdb_linux.hpp.

Here is the call graph for this function:

template<DBTYPE dbtypeT>
bool moost::kvds::KvdsBdb< dbtypeT >::end ( ) [inline]

Definition at line 457 of file kvds_bdb_linux.hpp.

template<DBTYPE dbtypeT>
bool moost::kvds::KvdsBdb< dbtypeT >::get ( void const *  pkey,
size_t const  ksize,
void *  pval,
size_t &  vsize 
) [inline]

Definition at line 252 of file kvds_bdb_linux.hpp.

Here is the call graph for this function:

template<DBTYPE dbtypeT>
int moost::kvds::KvdsBdb< dbtypeT >::get ( Dbt &  kt,
Dbt &  vt 
) [inline, private]

Definition at line 501 of file kvds_bdb_linux.hpp.

template<DBTYPE dbtypeT>
store_type& moost::kvds::KvdsBdb< dbtypeT >::get_store ( ) [inline]

You can call this to get a refernce to the underlying store. Useful if you need to do post construction configuration. For example if using a google hash or spare map you need to specify the delete/erase keys

Definition at line 198 of file kvds_bdb_linux.hpp.

template<DBTYPE dbtypeT>
bool moost::kvds::KvdsBdb< dbtypeT >::nil ( bool &  isnil) [inline]

Definition at line 491 of file kvds_bdb_linux.hpp.

Here is the call graph for this function:

template<DBTYPE dbtypeT>
bool moost::kvds::KvdsBdb< dbtypeT >::nxt ( void *  pkey,
size_t &  ksize 
) [inline]

Definition at line 423 of file kvds_bdb_linux.hpp.

Here is the call graph for this function:

template<DBTYPE dbtypeT>
void moost::kvds::KvdsBdb< dbtypeT >::open ( char const  dsname[],
bool  newdb = false 
) [inline]

We do not support transactions!

Definition at line 160 of file kvds_bdb_linux.hpp.

Here is the caller graph for this function:

template<DBTYPE dbtypeT>
bool moost::kvds::KvdsBdb< dbtypeT >::put ( void const *  pkey,
size_t const  ksize,
void const *  pval,
size_t const  vsize 
) [inline]

Definition at line 235 of file kvds_bdb_linux.hpp.

Here is the call graph for this function:

template<DBTYPE dbtypeT>
void moost::kvds::KvdsBdb< dbtypeT >::save ( ) [inline]

Definition at line 174 of file kvds_bdb_linux.hpp.

template<DBTYPE dbtypeT>
void moost::kvds::KvdsBdb< dbtypeT >::set_next_itr ( ) [inline, private]

all good :)

End

Definition at line 206 of file kvds_bdb_linux.hpp.

Here is the caller graph for this function:

template<DBTYPE dbtypeT>
bool moost::kvds::KvdsBdb< dbtypeT >::siz ( void const *  pkey,
size_t const  ksize,
size_t &  vsize 
) [inline]

Definition at line 462 of file kvds_bdb_linux.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<DBTYPE dbtypeT>
bool moost::kvds::KvdsBdb< dbtypeT >::xst ( void const *  pkey,
size_t const  ksize 
) [inline]

Definition at line 365 of file kvds_bdb_linux.hpp.

Here is the call graph for this function:


Member Data Documentation

template<DBTYPE dbtypeT>
store_type moost::kvds::KvdsBdb< dbtypeT >::pdb_ [private]

Definition at line 508 of file kvds_bdb_linux.hpp.

template<DBTYPE dbtypeT>
Dbc* moost::kvds::KvdsBdb< dbtypeT >::pitr_ [private]

Definition at line 509 of file kvds_bdb_linux.hpp.


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