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>
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 > | 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 |
![]() | |
virtual | ~LuceneObject () |
virtual void | initialize () |
Called directly after instantiation to create objects that depend on this object being fully constructed. | |
virtual LuceneObjectPtr | clone (const LuceneObjectPtr &other=LuceneObjectPtr()) |
Return clone of this object. | |
virtual int32_t | hashCode () |
Return hash code for this object. | |
virtual bool | equals (const LuceneObjectPtr &other) |
Return whether two objects are equal. | |
virtual int32_t | compareTo (const LuceneObjectPtr &other) |
Compare two objects. | |
virtual String | toString () |
Returns a string representation of the object. | |
![]() | |
virtual | ~LuceneSync () |
virtual SynchronizePtr | getSync () |
Return this object synchronize lock. | |
virtual LuceneSignalPtr | getSignal () |
Return this object signal. | |
virtual void | lock (int32_t timeout=0) |
Lock this object using an optional timeout. | |
virtual void | unlock () |
Unlock this object. | |
virtual bool | holdsLock () |
Returns true if this object is currently locked by current thread. | |
virtual void | wait (int32_t timeout=0) |
Wait for signal using an optional timeout. | |
virtual void | notifyAll () |
Notify all threads waiting for signal. | |
Protected Attributes | |
int32_t | cacheSize |
key_list | cacheList |
map_type | cacheMap |
![]() | |
SynchronizePtr | objectLock |
LuceneSignalPtr | objectSignal |
Additional Inherited Members | |
![]() | |
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> 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 |