libmoost
moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT > Class Template Reference

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

#include <kvds_page_store.hpp>

List of all members.

Public Types

typedef boost::uint8_t storeid_t
typedef boost::uint32_t itemid_t
typedef std::pair< storeid_t,
itemid_t
pageinfo_t
typedef KeyHashFunctorT KeyHashFunctor
typedef
moost::container::sparse_hash_map
< byte_array_t, pageinfo_t,
KeyHashFunctor
storage_t
typedef storage_t::key_type key_type
typedef storage_t::size_type size_type
typedef storage_t::iterator iterator
typedef storage_t::const_iterator const_iterator

Public Member Functions

 KvdsPageMapNonIntrinsicKey ()
storage_tget_storage ()
iterator begin ()
iterator end ()
size_type size () const
void resize (size_type const size)
bool empty () const
void clear ()
iterator find (void const *pkey, size_t const ksize)
void erase (iterator itr)
iterator insert (void const *pkey, size_t const ksize, pageinfo_t const &page_info)
bool itr2key (const_iterator itr, void *pkey, size_t &ksize) const
 A generic method to convert an iterator to a key (page store has no idea how to do this)
void load (std::string const &fname, bool newdb)
void save (std::string const &fname) const

Private Attributes

storage_t storage_

Detailed Description

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
class moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >

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

A non-intrinsic type pagemap, which uses the default key hash functor (above). If you're not too worried about performance and/or memory usage then this provides a nice simple way to get up and running with the KVDS Page Store. If you wish to provide a specific pagemap that is customised for your specific key types you can do so by createing your own custom pagemap class. This is the default page map unless you specify another.

Definition at line 479 of file kvds_page_store.hpp.


Member Typedef Documentation

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
typedef storage_t::const_iterator moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::const_iterator

Definition at line 490 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
typedef boost::uint32_t moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::itemid_t

Definition at line 483 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
typedef storage_t::iterator moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::iterator

Definition at line 489 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
typedef storage_t::key_type moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::key_type

Definition at line 487 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
typedef KeyHashFunctorT moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::KeyHashFunctor

Definition at line 485 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
typedef std::pair<storeid_t, itemid_t> moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::pageinfo_t

Definition at line 484 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
typedef storage_t::size_type moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::size_type

Definition at line 488 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
typedef moost::container::sparse_hash_map<byte_array_t, pageinfo_t, KeyHashFunctor> moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::storage_t

Definition at line 486 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
typedef boost::uint8_t moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::storeid_t

Definition at line 482 of file kvds_page_store.hpp.


Constructor & Destructor Documentation

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::KvdsPageMapNonIntrinsicKey ( ) [inline]

Definition at line 493 of file kvds_page_store.hpp.


Member Function Documentation

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
iterator moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::begin ( ) [inline]

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= INTERFACE: You MUST implement the following methods in your storage =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Definition at line 521 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
void moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::clear ( ) [inline]

Definition at line 531 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
bool moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::empty ( ) const [inline]

Definition at line 529 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
iterator moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::end ( ) [inline]

Definition at line 523 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
void moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::erase ( iterator  itr) [inline]

Definition at line 542 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
iterator moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::find ( void const *  pkey,
size_t const  ksize 
) [inline]

Definition at line 533 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
storage_t& moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::get_storage ( ) [inline]

Allow the client to apply any specific settings to the underlying storage. We need to do this to ensure the interface of each storage is consistance and yet different stores may have different requirements. For example the sparse hash map needs a call to set_deleted to allow deletions.

Definition at line 512 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
iterator moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::insert ( void const *  pkey,
size_t const  ksize,
pageinfo_t const &  page_info 
) [inline]

Definition at line 547 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
bool moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::itr2key ( const_iterator  itr,
void *  pkey,
size_t &  ksize 
) const [inline]

A generic method to convert an iterator to a key (page store has no idea how to do this)

Definition at line 558 of file kvds_page_store.hpp.

Here is the call graph for this function:

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
void moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::load ( std::string const &  fname,
bool  newdb 
) [inline]

Definition at line 577 of file kvds_page_store.hpp.

Here is the call graph for this function:

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
void moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::resize ( size_type const  size) [inline]

Definition at line 527 of file kvds_page_store.hpp.

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
void moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::save ( std::string const &  fname) const [inline]

Write key (size and value)

Write 2 part value (1: store, 2: indx)

Definition at line 613 of file kvds_page_store.hpp.

Here is the call graph for this function:

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
size_type moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::size ( ) const [inline]

Definition at line 525 of file kvds_page_store.hpp.

Here is the caller graph for this function:


Member Data Documentation

template<typename KeyHashFunctorT = KvdsPageMapDefaultKeyHashFunctor>
storage_t moost::kvds::KvdsPageMapNonIntrinsicKey< KeyHashFunctorT >::storage_ [private]

Definition at line 639 of file kvds_page_store.hpp.


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