Lucene++ - a full-featured, c++ search engine
API Documentation
General purpose LRU cache map. Accessing an entry will keep the entry cached. get(const KEY&) and put(const KEY&, const VALUE&) results in an access to the corresponding entry. More...
#include <SimpleLRUCache.h>
Inheritance diagram for Lucene::SimpleLRUCache< KEY, VALUE, HASH, EQUAL >:Public Types | |
| typedef std::pair< KEY, VALUE > | key_value |
| typedef std::list< key_value > | key_list |
| typedef key_list::const_iterator | const_iterator |
| typedef boost::unordered_map < KEY, typename key_list::iterator, HASH, EQUAL, LuceneAllocator < std::pair< KEY, typename key_list::iterator > > > | map_type |
| typedef map_type::const_iterator | map_iterator |
Public Member Functions | |
| SimpleLRUCache (int32_t cacheSize) | |
| virtual | ~SimpleLRUCache () |
| void | put (const KEY &key, const VALUE &value) |
| VALUE | get (const KEY &key) |
| bool | contains (const KEY &key) const |
| int32_t | size () const |
| const_iterator | begin () const |
| const_iterator | end () const |
Public Member Functions inherited from Lucene::LuceneObject | |
| virtual | ~LuceneObject () |
| virtual void | initialize () |
| Called directly after instantiation to create objects that depend on this object being fully constructed. More... | |
| virtual LuceneObjectPtr | clone (LuceneObjectPtr other=LuceneObjectPtr()) |
| Return clone of this object. More... | |
| virtual int32_t | hashCode () |
| Return hash code for this object. More... | |
| virtual bool | equals (LuceneObjectPtr other) |
| Return whether two objects are equal. More... | |
| virtual int32_t | compareTo (LuceneObjectPtr other) |
| Compare two objects. More... | |
| virtual String | toString () |
| Returns a string representation of the object. More... | |
Public Member Functions inherited from Lucene::LuceneSync | |
| virtual | ~LuceneSync () |
| virtual SynchronizePtr | getSync () |
| Return this object synchronize lock. More... | |
| virtual LuceneSignalPtr | getSignal () |
| Return this object signal. More... | |
| virtual void | lock (int32_t timeout=0) |
| Lock this object using an optional timeout. More... | |
| virtual void | unlock () |
| Unlock this object. More... | |
| virtual bool | holdsLock () |
| Returns true if this object is currently locked by current thread. More... | |
| virtual void | wait (int32_t timeout=0) |
| Wait for signal using an optional timeout. More... | |
| virtual void | notifyAll () |
| Notify all threads waiting for signal. More... | |
Protected Attributes | |
| int32_t | cacheSize |
| key_list | cacheList |
| map_type | cacheMap |
Additional Inherited Members | |
Protected Member Functions inherited from Lucene::LuceneObject | |
| LuceneObject () | |
General purpose LRU cache map. Accessing an entry will keep the entry cached. get(const KEY&) and put(const KEY&, const VALUE&) results in an access to the corresponding entry.
| typedef key_list::const_iterator Lucene::SimpleLRUCache< KEY, VALUE, HASH, EQUAL >::const_iterator |
| typedef std::list< key_value > Lucene::SimpleLRUCache< KEY, VALUE, HASH, EQUAL >::key_list |
| typedef std::pair<KEY, VALUE> Lucene::SimpleLRUCache< KEY, VALUE, HASH, EQUAL >::key_value |
| typedef map_type::const_iterator Lucene::SimpleLRUCache< KEY, VALUE, HASH, EQUAL >::map_iterator |
| typedef boost::unordered_map< KEY, typename key_list::iterator, HASH, EQUAL, LuceneAllocator< std::pair<KEY, typename key_list::iterator> > > Lucene::SimpleLRUCache< KEY, VALUE, HASH, EQUAL >::map_type |
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
Referenced by Lucene::SimpleLRUCache< KEY, VALUE, HASH, EQUAL >::begin(), Lucene::SimpleLRUCache< KEY, VALUE, HASH, EQUAL >::end(), Lucene::SimpleLRUCache< KEY, VALUE, HASH, EQUAL >::get(), Lucene::SimpleLRUCache< KEY, VALUE, HASH, EQUAL >::put(), and Lucene::SimpleLRUCache< KEY, VALUE, HASH, EQUAL >::size().
|
protected |
|
protected |