Stxxl  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
stxxl::btree::node_cache< NodeType, BTreeType > Class Template Reference

#include <node_cache.h>

Inheritance diagram for stxxl::btree::node_cache< NodeType, BTreeType >:
Inheritance graph
[legend]
Collaboration diagram for stxxl::btree::node_cache< NodeType, BTreeType >:
Collaboration graph
[legend]

List of all members.

Classes

struct  bid_hash

Public Types

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

Public Member Functions

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

Private Types

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

Private Member Functions

void change_btree_pointers (btree_type *b)

Private Attributes

btree_typebtree_
key_compare comp_
std::vector< node_type * > nodes_
std::vector< request_ptrreqs_
std::vector< bool > fixed_
std::vector< bool > dirty_
std::vector< int_typefree_nodes_
BID2node_type BID2node_
pager_type pager_
block_managerbm
alloc_strategy_type alloc_strategy_
int64 n_found
int64 n_not_found
int64 n_created
int64 n_deleted
int64 n_read
int64 n_written
int64 n_clean_forced

Detailed Description

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

Definition at line 35 of file node_cache.h.


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 44 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 90 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 41 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 40 of file node_cache.h.

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

Definition at line 38 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 87 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 42 of file node_cache.h.

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

Definition at line 39 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 45 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  comp__ 
) [inline]

Definition at line 116 of file node_cache.h.

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

Definition at line 171 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) [inline, private]

Definition at line 106 of file node_cache.h.

Referenced by stxxl::btree::node_cache< leaf_type, SelfType >::swap().

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

Definition at line 464 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]

Definition at line 369 of file node_cache.h.

template<class NodeType, class BTreeType>
node_type* stxxl::btree::node_cache< NodeType, BTreeType >::get_new_node ( bid_type new_bid) [inline]

Definition at line 189 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]

Definition at line 272 of file node_cache.h.

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

Definition at line 158 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 492 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 599 of file node_cache.h.

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

Definition at line 616 of file node_cache.h.

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

Definition at line 152 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 578 of file node_cache.h.

Referenced by std::swap().

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

Definition at line 571 of file node_cache.h.


Member Data Documentation

template<class NodeType, class BTreeType>
alloc_strategy_type stxxl::btree::node_cache< NodeType, BTreeType >::alloc_strategy_ [private]

Definition at line 95 of file node_cache.h.

Referenced by stxxl::btree::node_cache< leaf_type, SelfType >::swap().

template<class NodeType, class BTreeType>
BID2node_type stxxl::btree::node_cache< NodeType, BTreeType >::BID2node_ [private]

Definition at line 92 of file node_cache.h.

Referenced by stxxl::btree::node_cache< leaf_type, SelfType >::swap().

template<class NodeType, class BTreeType>
block_manager* stxxl::btree::node_cache< NodeType, BTreeType >::bm [private]

Definition at line 94 of file node_cache.h.

template<class NodeType, class BTreeType>
btree_type* stxxl::btree::node_cache< NodeType, BTreeType >::btree_ [private]

Definition at line 48 of file node_cache.h.

Referenced by stxxl::btree::node_cache< leaf_type, SelfType >::swap().

template<class NodeType, class BTreeType>
key_compare stxxl::btree::node_cache< NodeType, BTreeType >::comp_ [private]

Definition at line 49 of file node_cache.h.

Referenced by stxxl::btree::node_cache< leaf_type, SelfType >::swap().

template<class NodeType, class BTreeType>
std::vector<bool> stxxl::btree::node_cache< NodeType, BTreeType >::dirty_ [private]

Definition at line 85 of file node_cache.h.

template<class NodeType, class BTreeType>
std::vector<bool> stxxl::btree::node_cache< NodeType, BTreeType >::fixed_ [private]

Definition at line 84 of file node_cache.h.

Referenced by stxxl::btree::node_cache< leaf_type, SelfType >::swap().

template<class NodeType, class BTreeType>
std::vector<int_type> stxxl::btree::node_cache< NodeType, BTreeType >::free_nodes_ [private]

Definition at line 86 of file node_cache.h.

Referenced by stxxl::btree::node_cache< leaf_type, SelfType >::swap().

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

Definition at line 103 of file node_cache.h.

Referenced by stxxl::btree::node_cache< leaf_type, SelfType >::swap().

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

Definition at line 99 of file node_cache.h.

Referenced by stxxl::btree::node_cache< leaf_type, SelfType >::swap().

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

Definition at line 100 of file node_cache.h.

Referenced by stxxl::btree::node_cache< leaf_type, SelfType >::swap().

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

Definition at line 97 of file node_cache.h.

Referenced by stxxl::btree::node_cache< leaf_type, SelfType >::swap().

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

Definition at line 98 of file node_cache.h.

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

Definition at line 101 of file node_cache.h.

Referenced by stxxl::btree::node_cache< leaf_type, SelfType >::swap().

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

Definition at line 102 of file node_cache.h.

Referenced by stxxl::btree::node_cache< leaf_type, SelfType >::swap().

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

Definition at line 82 of file node_cache.h.

Referenced by stxxl::btree::node_cache< leaf_type, SelfType >::swap().

template<class NodeType, class BTreeType>
pager_type stxxl::btree::node_cache< NodeType, BTreeType >::pager_ [private]

Definition at line 93 of file node_cache.h.

Referenced by stxxl::btree::node_cache< leaf_type, SelfType >::swap().

template<class NodeType, class BTreeType>
std::vector<request_ptr> stxxl::btree::node_cache< NodeType, BTreeType >::reqs_ [private]

Definition at line 83 of file node_cache.h.

Referenced by stxxl::btree::node_cache< leaf_type, SelfType >::swap().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines