STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::btree::node_cache< NodeType, BTreeType > Class Template Reference

Detailed Description

template<class NodeType, class BTreeType>
class stxxl::btree::node_cache< NodeType, BTreeType >

Definition at line 24 of file leaf.h.

+ Inheritance diagram for stxxl::btree::node_cache< NodeType, BTreeType >:
+ Collaboration diagram for stxxl::btree::node_cache< NodeType, BTreeType >:

Classes

struct  bid_hash
 

Public Types

typedef
btree_type::alloc_strategy_type 
alloc_strategy_type
 
typedef node_type::bid_type bid_type
 
typedef node_type::block_type block_type
 
typedef BTreeType btree_type
 
typedef btree_type::key_compare key_compare
 
typedef NodeType node_type
 
typedef stxxl::lru_pager pager_type
 

Public Member Functions

 node_cache (unsigned_type cache_size_in_bytes, btree_type *btree, key_compare cmp)
 
 ~node_cache ()
 
void delete_node (const bid_type &bid)
 
node_type const * get_const_node (const bid_type &bid, bool fix=false)
 
node_typeget_new_node (bid_type &new_bid)
 
node_typeget_node (const bid_type &bid, bool fix=false)
 
unsigned_type nfixed () const
 
void prefetch_node (const bid_type &bid)
 
void print_statistics (std::ostream &o) const
 
void reset_statistics ()
 
unsigned_type size () const
 
void swap (node_cache &obj)
 
void unfix_node (const bid_type &bid)
 

Private Types

typedef hash_map_type bid2node_type
 
typedef compat_hash_map
< bid_type, int_type, bid_hash >
::result 
hash_map_type
 

Private Member Functions

void change_btree_pointers (btree_type *b)
 
- Private Member Functions inherited from stxxl::noncopyable
 noncopyable ()
 

Private Attributes

alloc_strategy_type m_alloc_strategy
 
bid2node_type m_bid2node
 
block_managerm_bm
 
btree_typem_btree
 
key_compare m_cmp
 
std::vector< bool > m_dirty
 
std::vector< bool > m_fixed
 
std::vector< int_typem_free_nodes
 
std::vector< node_type * > m_nodes
 
pager_type m_pager
 
std::vector< request_ptrm_reqs
 
int64 n_clean_forced
 
int64 n_created
 
int64 n_deleted
 
int64 n_found
 
int64 n_not_found
 
int64 n_read
 
int64 n_written
 

Member Typedef Documentation

template<class NodeType, class BTreeType>
typedef btree_type::alloc_strategy_type stxxl::btree::node_cache< NodeType, BTreeType >::alloc_strategy_type

Definition at line 42 of file node_cache.h.

template<class NodeType, class BTreeType>
typedef hash_map_type stxxl::btree::node_cache< NodeType, BTreeType >::bid2node_type
private

Definition at line 88 of file node_cache.h.

template<class NodeType, class BTreeType>
typedef node_type::bid_type stxxl::btree::node_cache< NodeType, BTreeType >::bid_type

Definition at line 39 of file node_cache.h.

template<class NodeType, class BTreeType>
typedef node_type::block_type stxxl::btree::node_cache< NodeType, BTreeType >::block_type

Definition at line 38 of file node_cache.h.

template<class NodeType, class BTreeType>
typedef BTreeType stxxl::btree::node_cache< NodeType, BTreeType >::btree_type

Definition at line 36 of file node_cache.h.

template<class NodeType, class BTreeType>
typedef compat_hash_map<bid_type, int_type, bid_hash>::result stxxl::btree::node_cache< NodeType, BTreeType >::hash_map_type
private

Definition at line 85 of file node_cache.h.

template<class NodeType, class BTreeType>
typedef btree_type::key_compare stxxl::btree::node_cache< NodeType, BTreeType >::key_compare

Definition at line 40 of file node_cache.h.

template<class NodeType, class BTreeType>
typedef NodeType stxxl::btree::node_cache< NodeType, BTreeType >::node_type

Definition at line 37 of file node_cache.h.

template<class NodeType, class BTreeType>
typedef stxxl::lru_pager stxxl::btree::node_cache< NodeType, BTreeType >::pager_type

Definition at line 43 of file node_cache.h.

Constructor & Destructor Documentation

template<class NodeType, class BTreeType>
stxxl::btree::node_cache< NodeType, BTreeType >::node_cache ( unsigned_type  cache_size_in_bytes,
btree_type btree,
key_compare  cmp 
)
inline

Definition at line 114 of file node_cache.h.

template<class NodeType, class BTreeType>
stxxl::btree::node_cache< NodeType, BTreeType >::~node_cache ( )
inline

Definition at line 168 of file node_cache.h.

Member Function Documentation

template<class NodeType, class BTreeType>
void stxxl::btree::node_cache< NodeType, BTreeType >::change_btree_pointers ( btree_type b)
inlineprivate

Definition at line 104 of file node_cache.h.

template<class NodeType, class BTreeType>
void stxxl::btree::node_cache< NodeType, BTreeType >::delete_node ( const bid_type bid)
inline

Definition at line 450 of file node_cache.h.

template<class NodeType, class BTreeType>
node_type const* stxxl::btree::node_cache< NodeType, BTreeType >::get_const_node ( const bid_type bid,
bool  fix = false 
)
inline
template<class NodeType, class BTreeType>
node_type* stxxl::btree::node_cache< NodeType, BTreeType >::get_new_node ( bid_type new_bid)
inline

Definition at line 186 of file node_cache.h.

template<class NodeType, class BTreeType>
node_type* stxxl::btree::node_cache< NodeType, BTreeType >::get_node ( const bid_type bid,
bool  fix = false 
)
inline
template<class NodeType, class BTreeType>
unsigned_type stxxl::btree::node_cache< NodeType, BTreeType >::nfixed ( ) const
inline

Definition at line 155 of file node_cache.h.

template<class NodeType, class BTreeType>
void stxxl::btree::node_cache< NodeType, BTreeType >::prefetch_node ( const bid_type bid)
inline

Definition at line 477 of file node_cache.h.

template<class NodeType, class BTreeType>
void stxxl::btree::node_cache< NodeType, BTreeType >::print_statistics ( std::ostream &  o) const
inline

Definition at line 581 of file node_cache.h.

template<class NodeType, class BTreeType>
void stxxl::btree::node_cache< NodeType, BTreeType >::reset_statistics ( )
inline

Definition at line 597 of file node_cache.h.

template<class NodeType, class BTreeType>
unsigned_type stxxl::btree::node_cache< NodeType, BTreeType >::size ( ) const
inline

Definition at line 149 of file node_cache.h.

template<class NodeType, class BTreeType>
void stxxl::btree::node_cache< NodeType, BTreeType >::swap ( node_cache< NodeType, BTreeType > &  obj)
inline

Definition at line 560 of file node_cache.h.

template<class NodeType, class BTreeType>
void stxxl::btree::node_cache< NodeType, BTreeType >::unfix_node ( const bid_type bid)
inline

Member Data Documentation

template<class NodeType, class BTreeType>
alloc_strategy_type stxxl::btree::node_cache< NodeType, BTreeType >::m_alloc_strategy
private

Definition at line 93 of file node_cache.h.

template<class NodeType, class BTreeType>
bid2node_type stxxl::btree::node_cache< NodeType, BTreeType >::m_bid2node
private

Definition at line 90 of file node_cache.h.

template<class NodeType, class BTreeType>
block_manager* stxxl::btree::node_cache< NodeType, BTreeType >::m_bm
private

Definition at line 92 of file node_cache.h.

template<class NodeType, class BTreeType>
btree_type* stxxl::btree::node_cache< NodeType, BTreeType >::m_btree
private

Definition at line 46 of file node_cache.h.

template<class NodeType, class BTreeType>
key_compare stxxl::btree::node_cache< NodeType, BTreeType >::m_cmp
private

Definition at line 47 of file node_cache.h.

template<class NodeType, class BTreeType>
std::vector<bool> stxxl::btree::node_cache< NodeType, BTreeType >::m_dirty
private

Definition at line 83 of file node_cache.h.

template<class NodeType, class BTreeType>
std::vector<bool> stxxl::btree::node_cache< NodeType, BTreeType >::m_fixed
private

Definition at line 82 of file node_cache.h.

template<class NodeType, class BTreeType>
std::vector<int_type> stxxl::btree::node_cache< NodeType, BTreeType >::m_free_nodes
private

Definition at line 84 of file node_cache.h.

template<class NodeType, class BTreeType>
std::vector<node_type*> stxxl::btree::node_cache< NodeType, BTreeType >::m_nodes
private

Definition at line 80 of file node_cache.h.

template<class NodeType, class BTreeType>
pager_type stxxl::btree::node_cache< NodeType, BTreeType >::m_pager
private

Definition at line 91 of file node_cache.h.

template<class NodeType, class BTreeType>
std::vector<request_ptr> stxxl::btree::node_cache< NodeType, BTreeType >::m_reqs
private

Definition at line 81 of file node_cache.h.

template<class NodeType, class BTreeType>
int64 stxxl::btree::node_cache< NodeType, BTreeType >::n_clean_forced
private

Definition at line 101 of file node_cache.h.

template<class NodeType, class BTreeType>
int64 stxxl::btree::node_cache< NodeType, BTreeType >::n_created
private

Definition at line 97 of file node_cache.h.

template<class NodeType, class BTreeType>
int64 stxxl::btree::node_cache< NodeType, BTreeType >::n_deleted
private

Definition at line 98 of file node_cache.h.

template<class NodeType, class BTreeType>
int64 stxxl::btree::node_cache< NodeType, BTreeType >::n_found
private

Definition at line 95 of file node_cache.h.

template<class NodeType, class BTreeType>
int64 stxxl::btree::node_cache< NodeType, BTreeType >::n_not_found
private

Definition at line 96 of file node_cache.h.

template<class NodeType, class BTreeType>
int64 stxxl::btree::node_cache< NodeType, BTreeType >::n_read
private

Definition at line 99 of file node_cache.h.

template<class NodeType, class BTreeType>
int64 stxxl::btree::node_cache< NodeType, BTreeType >::n_written
private

Definition at line 100 of file node_cache.h.


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