libmoost
moost::kvds::KvdsPageStore< PageMapT > Class Template Reference

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

#include <kvds_page_store.hpp>

List of all members.

Classes

class  Store

Public Types

typedef pagemap_t store_type

Public Member Functions

 KvdsPageStore ()
 ~KvdsPageStore ()
pagemap_tget_pagemap ()
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)
 Overwrites existing values.
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)
 Appends to existing values.
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)

Private Types

typedef size_t page_size_t
typedef PageMapT pagemap_t
typedef boost::uint8_t storeid_t
typedef PageMapT::itemid_t itemid_t
typedef PageMapT::pageinfo_t pageinfo_t
typedef boost::shared_ptr< Storestore_t
typedef
moost::container::sparse_hash_map
< storeid_t, store_t
store_index_t
typedef std::bitset< sizeof(page_size_t)*8 > store_inventory_t

Private Member Functions

std::string trim_inventory_string (std::string s) const
void save_impl (bool bClose=false)
storeid_t const * get_storeid (page_size_t page_size)
store_t get_store (storeid_t const id) const

Private Attributes

std::string dsname_
std::string pagemap_fname_
std::string storeinv_fname_
pagemap_t pagemap_
pagemap_t::const_iterator itr_
store_index_t store_index_
store_inventory_t store_inventory_
bool iterating_

Detailed Description

template<typename PageMapT>
class moost::kvds::KvdsPageStore< PageMapT >

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

Definition at line 647 of file kvds_page_store.hpp.


Member Typedef Documentation

template<typename PageMapT>
typedef PageMapT::itemid_t moost::kvds::KvdsPageStore< PageMapT >::itemid_t [private]

Definition at line 653 of file kvds_page_store.hpp.

template<typename PageMapT>
typedef size_t moost::kvds::KvdsPageStore< PageMapT >::page_size_t [private]

Definition at line 650 of file kvds_page_store.hpp.

template<typename PageMapT>
typedef PageMapT::pageinfo_t moost::kvds::KvdsPageStore< PageMapT >::pageinfo_t [private]

Definition at line 654 of file kvds_page_store.hpp.

template<typename PageMapT>
typedef PageMapT moost::kvds::KvdsPageStore< PageMapT >::pagemap_t [private]

Definition at line 651 of file kvds_page_store.hpp.

template<typename PageMapT>
typedef moost::container::sparse_hash_map<storeid_t, store_t> moost::kvds::KvdsPageStore< PageMapT >::store_index_t [private]

Definition at line 1179 of file kvds_page_store.hpp.

template<typename PageMapT>
typedef std::bitset<sizeof(page_size_t) * 8> moost::kvds::KvdsPageStore< PageMapT >::store_inventory_t [private]

Definition at line 1180 of file kvds_page_store.hpp.

template<typename PageMapT>
typedef boost::shared_ptr<Store> moost::kvds::KvdsPageStore< PageMapT >::store_t [private]

Definition at line 1178 of file kvds_page_store.hpp.

template<typename PageMapT>
typedef pagemap_t moost::kvds::KvdsPageStore< PageMapT >::store_type

Definition at line 1183 of file kvds_page_store.hpp.

template<typename PageMapT>
typedef boost::uint8_t moost::kvds::KvdsPageStore< PageMapT >::storeid_t [private]

Definition at line 652 of file kvds_page_store.hpp.


Constructor & Destructor Documentation

template<typename PageMapT>
moost::kvds::KvdsPageStore< PageMapT >::KvdsPageStore ( ) [inline]

Definition at line 1185 of file kvds_page_store.hpp.

template<typename PageMapT>
moost::kvds::KvdsPageStore< PageMapT >::~KvdsPageStore ( ) [inline]

Definition at line 1187 of file kvds_page_store.hpp.

Here is the call graph for this function:


Member Function Documentation

template<typename PageMapT>
bool moost::kvds::KvdsPageStore< PageMapT >::add ( void const *  pkey,
size_t const  ksize,
void const *  pval,
size_t const  vsize 
) [inline]

Appends to existing values.

Definition at line 1400 of file kvds_page_store.hpp.

Here is the call graph for this function:

template<typename PageMapT>
bool moost::kvds::KvdsPageStore< PageMapT >::all ( void const *  pkey,
size_t const  ksize,
void *  pval,
size_t &  vsize 
) [inline]

Definition at line 1458 of file kvds_page_store.hpp.

Here is the call graph for this function:

template<typename PageMapT>
bool moost::kvds::KvdsPageStore< PageMapT >::beg ( ) [inline]

Definition at line 1533 of file kvds_page_store.hpp.

template<typename PageMapT>
void moost::kvds::KvdsPageStore< PageMapT >::close ( ) [inline]

Definition at line 1263 of file kvds_page_store.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename PageMapT>
bool moost::kvds::KvdsPageStore< PageMapT >::clr ( ) [inline]

Definition at line 1517 of file kvds_page_store.hpp.

template<typename PageMapT>
bool moost::kvds::KvdsPageStore< PageMapT >::cnt ( boost::uint64_t &  cnt) [inline]

Definition at line 1582 of file kvds_page_store.hpp.

template<typename PageMapT>
bool moost::kvds::KvdsPageStore< PageMapT >::del ( void const *  pkey,
size_t const  ksize 
) [inline]

Definition at line 1500 of file kvds_page_store.hpp.

Here is the call graph for this function:

template<typename PageMapT>
bool moost::kvds::KvdsPageStore< PageMapT >::end ( ) [inline]

Definition at line 1559 of file kvds_page_store.hpp.

template<typename PageMapT>
bool moost::kvds::KvdsPageStore< PageMapT >::get ( void const *  pkey,
size_t const  ksize,
void *  pval,
size_t &  vsize 
) [inline]

Definition at line 1373 of file kvds_page_store.hpp.

Here is the call graph for this function:

template<typename PageMapT>
pagemap_t& moost::kvds::KvdsPageStore< PageMapT >::get_pagemap ( ) [inline]

Definition at line 1193 of file kvds_page_store.hpp.

template<typename PageMapT>
store_t moost::kvds::KvdsPageStore< PageMapT >::get_store ( storeid_t const  id) const [inline, private]

Definition at line 1316 of file kvds_page_store.hpp.

template<typename PageMapT>
store_type& moost::kvds::KvdsPageStore< PageMapT >::get_store ( ) [inline]

For the purposes of external configuration we return a reference to the pagemap so the any pagemap specific settings (such as itemcnt, deleted or erased key) can be set

Definition at line 1333 of file kvds_page_store.hpp.

Here is the caller graph for this function:

template<typename PageMapT>
storeid_t const* moost::kvds::KvdsPageStore< PageMapT >::get_storeid ( page_size_t  page_size) [inline, private]

Definition at line 1296 of file kvds_page_store.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename PageMapT>
bool moost::kvds::KvdsPageStore< PageMapT >::nil ( bool &  isnil) [inline]

Definition at line 1588 of file kvds_page_store.hpp.

template<typename PageMapT>
bool moost::kvds::KvdsPageStore< PageMapT >::nxt ( void *  pkey,
size_t &  ksize 
) [inline]

Definition at line 1539 of file kvds_page_store.hpp.

template<typename PageMapT>
void moost::kvds::KvdsPageStore< PageMapT >::open ( char const  dsname[],
bool  newdb = false 
) [inline]

Definition at line 1198 of file kvds_page_store.hpp.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename PageMapT>
bool moost::kvds::KvdsPageStore< PageMapT >::put ( void const *  pkey,
size_t const  ksize,
void const *  pval,
size_t const  vsize 
) [inline]

Overwrites existing values.

Definition at line 1338 of file kvds_page_store.hpp.

Here is the call graph for this function:

template<typename PageMapT>
void moost::kvds::KvdsPageStore< PageMapT >::save ( ) [inline]

Definition at line 1258 of file kvds_page_store.hpp.

Here is the call graph for this function:

template<typename PageMapT>
void moost::kvds::KvdsPageStore< PageMapT >::save_impl ( bool  bClose = false) [inline, private]

Definition at line 1285 of file kvds_page_store.hpp.

Here is the caller graph for this function:

template<typename PageMapT>
bool moost::kvds::KvdsPageStore< PageMapT >::siz ( void const *  pkey,
size_t const  ksize,
size_t &  vsize 
) [inline]

Definition at line 1564 of file kvds_page_store.hpp.

Here is the call graph for this function:

template<typename PageMapT>
std::string moost::kvds::KvdsPageStore< PageMapT >::trim_inventory_string ( std::string  s) const [inline, private]

Definition at line 1274 of file kvds_page_store.hpp.

Here is the caller graph for this function:

template<typename PageMapT>
bool moost::kvds::KvdsPageStore< PageMapT >::xst ( void const *  pkey,
size_t const  ksize 
) [inline]

Definition at line 1485 of file kvds_page_store.hpp.

Here is the call graph for this function:


Member Data Documentation

template<typename PageMapT>
std::string moost::kvds::KvdsPageStore< PageMapT >::dsname_ [private]

Definition at line 1595 of file kvds_page_store.hpp.

template<typename PageMapT>
bool moost::kvds::KvdsPageStore< PageMapT >::iterating_ [private]

Definition at line 1602 of file kvds_page_store.hpp.

template<typename PageMapT>
pagemap_t::const_iterator moost::kvds::KvdsPageStore< PageMapT >::itr_ [private]

Definition at line 1599 of file kvds_page_store.hpp.

template<typename PageMapT>
pagemap_t moost::kvds::KvdsPageStore< PageMapT >::pagemap_ [private]

Definition at line 1598 of file kvds_page_store.hpp.

template<typename PageMapT>
std::string moost::kvds::KvdsPageStore< PageMapT >::pagemap_fname_ [private]

Definition at line 1596 of file kvds_page_store.hpp.

template<typename PageMapT>
store_index_t moost::kvds::KvdsPageStore< PageMapT >::store_index_ [private]

Definition at line 1600 of file kvds_page_store.hpp.

template<typename PageMapT>
store_inventory_t moost::kvds::KvdsPageStore< PageMapT >::store_inventory_ [private]

Definition at line 1601 of file kvds_page_store.hpp.

template<typename PageMapT>
std::string moost::kvds::KvdsPageStore< PageMapT >::storeinv_fname_ [private]

Definition at line 1597 of file kvds_page_store.hpp.


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