|
libmoost
|
map_store provides storage by presenting a thread-safe scoped_stream given a key and requested size More...
#include <map_store.hpp>

Classes | |
| struct | location |
| class | scoped_block |
Public Member Functions | |
| map_store (const std::string &base_path, size_t min_block_size=64, size_t max_block_size=16777216, size_t streams_per_block_size=8) | |
| Constructs a map_store. | |
| ~map_store () | |
| Destroys a map_store. | |
| void | set_deleted_key (const Key &key) |
Private Types | |
| typedef moost::container::sparse_hash_map < Key, location, HashFcn > | hm_key_location |
Private Member Functions | |
| void | get (boost::scoped_ptr< variable_store::scoped_block > &p, const Key &key) |
| void | alloc (boost::scoped_ptr< variable_store::scoped_block > &p, const Key &key, size_t block_size) |
| void | free (const Key &key) |
Private Attributes | |
| std::string | m_key_location_path |
| variable_store | m_variable_store |
| hm_key_location | m_key_location |
| boost::mutex | m_mutex |
map_store provides storage by presenting a thread-safe scoped_stream given a key and requested size
Definition at line 52 of file map_store.hpp.
typedef moost::container::sparse_hash_map<Key, location, HashFcn > moost::io::map_store< Key, HashFcn >::hm_key_location [private] |
Definition at line 64 of file map_store.hpp.
| moost::io::map_store< Key, HashFcn >::map_store | ( | const std::string & | base_path, |
| size_t | min_block_size = 64, |
||
| size_t | max_block_size = 16777216, |
||
| size_t | streams_per_block_size = 8 |
||
| ) | [inline] |
Constructs a map_store.
Definition at line 160 of file map_store.hpp.
| moost::io::map_store< Key, HashFcn >::~map_store | ( | ) | [inline] |
Destroys a map_store.
Definition at line 188 of file map_store.hpp.

| void moost::io::map_store< Key, HashFcn >::alloc | ( | boost::scoped_ptr< variable_store::scoped_block > & | p, |
| const Key & | key, | ||
| size_t | block_size | ||
| ) | [inline, private] |
allocs a scoped_block for a new key doesn't support reallocing on an existing key, maybe in the future
Definition at line 88 of file map_store.hpp.

| void moost::io::map_store< Key, HashFcn >::free | ( | const Key & | key | ) | [inline, private] |
frees a key
Definition at line 104 of file map_store.hpp.
| void moost::io::map_store< Key, HashFcn >::get | ( | boost::scoped_ptr< variable_store::scoped_block > & | p, |
| const Key & | key | ||
| ) | [inline, private] |
gets a scoped_block given a key, or leaves empty if the key is not found
Definition at line 73 of file map_store.hpp.

| void moost::io::map_store< Key, HashFcn >::set_deleted_key | ( | const Key & | key | ) | [inline] |
If you're going to delete keys, you must specify a deleted key that will never be used as a real key.
Definition at line 217 of file map_store.hpp.

hm_key_location moost::io::map_store< Key, HashFcn >::m_key_location [private] |
Definition at line 68 of file map_store.hpp.
std::string moost::io::map_store< Key, HashFcn >::m_key_location_path [private] |
Definition at line 66 of file map_store.hpp.
boost::mutex moost::io::map_store< Key, HashFcn >::m_mutex [private] |
Definition at line 69 of file map_store.hpp.
variable_store moost::io::map_store< Key, HashFcn >::m_variable_store [private] |
Definition at line 67 of file map_store.hpp.