#include <BoundedHash.h>
Classes | |
| struct | bh_ts_key |
Public Member Functions | |
| bool | blocked () |
| BoundedHash (int size, int buffer) | |
| BoundedHash () | |
| void | clear () |
| int | countk2 (S key2) |
| void | drain () |
| bool | find (S key) |
| T & | get (S key) |
| S | getKey (S key2, int idx=0) |
| int | getSize () |
| T & | insert (S key, S key2, R sort_key) |
| void | lock () |
| T | pop () |
| T | pop (int key) |
| bool | setBufferSize (int size) |
| bool | setSize (int size) |
| void | setStrict (bool _strict) |
| void | signal () |
| void | sleep () |
| void | sort () |
| void | unlock () |
| virtual | ~BoundedHash () |
Private Types | |
| typedef multimap< S, S >::iterator | mmit |
Private Member Functions | |
| bool | erase (int vector_idx) |
Static Private Member Functions | |
| static bool | sort_fun (bh_ts_key i, bh_ts_key j) |
Private Attributes | |
| int | buffer |
| hash_map< S, T > | hm |
| multimap< S, S > | mm |
| pthread_mutex_t | mtxs |
| sem_t | sem |
| int | size |
| bool | strict |
| std::vector< bh_ts_key > | v |
Definition at line 52 of file BoundedHash.h.
typedef multimap<S,S>::iterator BoundedHash< S, T, R >::mmit [private] |
Definition at line 53 of file BoundedHash.h.
| BoundedHash< S, T, R >::BoundedHash | ( | int | size, |
| int | buffer | ||
| ) | [inline] |
Definition at line 100 of file BoundedHash.h.
| BoundedHash< S, T, R >::BoundedHash | ( | ) | [inline] |
Definition at line 107 of file BoundedHash.h.
| virtual BoundedHash< S, T, R >::~BoundedHash | ( | ) | [inline, virtual] |
Definition at line 136 of file BoundedHash.h.
| bool BoundedHash< S, T, R >::blocked | ( | ) | [inline] |
Definition at line 258 of file BoundedHash.h.
| void BoundedHash< S, T, R >::clear | ( | ) | [inline] |
Definition at line 249 of file BoundedHash.h.
| int BoundedHash< S, T, R >::countk2 | ( | S | key2 | ) | [inline] |
Definition at line 201 of file BoundedHash.h.
| void BoundedHash< S, T, R >::drain | ( | ) | [inline] |
Definition at line 145 of file BoundedHash.h.
| bool BoundedHash< S, T, R >::erase | ( | int | vector_idx | ) | [inline, private] |
Definition at line 75 of file BoundedHash.h.
| bool BoundedHash< S, T, R >::find | ( | S | key | ) | [inline] |
Definition at line 235 of file BoundedHash.h.
| T& BoundedHash< S, T, R >::get | ( | S | key | ) | [inline] |
Definition at line 188 of file BoundedHash.h.
| S BoundedHash< S, T, R >::getKey | ( | S | key2, |
| int | idx = 0 |
||
| ) | [inline] |
Definition at line 192 of file BoundedHash.h.
| int BoundedHash< S, T, R >::getSize | ( | ) | [inline] |
Definition at line 117 of file BoundedHash.h.
| T& BoundedHash< S, T, R >::insert | ( | S | key, |
| S | key2, | ||
| R | sort_key | ||
| ) | [inline] |
Definition at line 157 of file BoundedHash.h.
| void BoundedHash< S, T, R >::lock | ( | ) | [inline] |
Definition at line 138 of file BoundedHash.h.
| T BoundedHash< S, T, R >::pop | ( | ) | [inline] |
Definition at line 208 of file BoundedHash.h.
| T BoundedHash< S, T, R >::pop | ( | int | key | ) | [inline] |
Definition at line 220 of file BoundedHash.h.
| bool BoundedHash< S, T, R >::setBufferSize | ( | int | size | ) | [inline] |
Definition at line 122 of file BoundedHash.h.
| bool BoundedHash< S, T, R >::setSize | ( | int | size | ) | [inline] |
Definition at line 127 of file BoundedHash.h.
| void BoundedHash< S, T, R >::setStrict | ( | bool | _strict | ) | [inline] |
Definition at line 114 of file BoundedHash.h.
| void BoundedHash< S, T, R >::signal | ( | ) | [inline] |
Definition at line 261 of file BoundedHash.h.
| void BoundedHash< S, T, R >::sleep | ( | ) | [inline] |
Definition at line 243 of file BoundedHash.h.
| void BoundedHash< S, T, R >::sort | ( | ) | [inline] |
Definition at line 184 of file BoundedHash.h.
| static bool BoundedHash< S, T, R >::sort_fun | ( | bh_ts_key | i, |
| bh_ts_key | j | ||
| ) | [inline, static, private] |
Definition at line 61 of file BoundedHash.h.
| void BoundedHash< S, T, R >::unlock | ( | ) | [inline] |
Definition at line 141 of file BoundedHash.h.
int BoundedHash< S, T, R >::buffer [private] |
Definition at line 71 of file BoundedHash.h.
hash_map<S,T> BoundedHash< S, T, R >::hm [private] |
Definition at line 69 of file BoundedHash.h.
multimap<S,S> BoundedHash< S, T, R >::mm [private] |
Definition at line 70 of file BoundedHash.h.
pthread_mutex_t BoundedHash< S, T, R >::mtxs [private] |
Definition at line 67 of file BoundedHash.h.
sem_t BoundedHash< S, T, R >::sem [private] |
Definition at line 68 of file BoundedHash.h.
int BoundedHash< S, T, R >::size [private] |
Definition at line 71 of file BoundedHash.h.
bool BoundedHash< S, T, R >::strict [private] |
Definition at line 73 of file BoundedHash.h.
std::vector<bh_ts_key> BoundedHash< S, T, R >::v [private] |
Definition at line 72 of file BoundedHash.h.