Custom cache with two levels of keys, outer key is the IndexReader with the inner key being a string, commonly a field name but can be anything. Refer to the unit tests for an example implementation.
- Template Parameters
-
| T | The type that is being cached. |
More...
Inherits Lucene.Net.Util.Cache.AbstractSegmentCache.
Inherited by Lucene.Net.Util.Cache.SegmentCache< T >.WeakKey.
|
| class | WeakKey |
| | A weak referene wrapper for the hashtable keys. Whenever a key pair is added to the hashtable, the key is wrapped using a WeakKey. WeakKey saves the value of the original object hashcode for fast comparison.
|
| |
|
| override void | Warm (IndexReader reader, string key) |
| | Warm the cache - simply calls Get and ignores the return value.
|
| |
| virtual T | Get (IndexReader reader, string key) |
| | Get the item from the cache.
|
| |
|
| int | KeyCount [get] |
| | The number of outermost keys in the collection.
|
| |
Custom cache with two levels of keys, outer key is the IndexReader with the inner key being a string, commonly a field name but can be anything. Refer to the unit tests for an example implementation.
- Template Parameters
-
| T | The type that is being cached. |
Definition at line 48 of file SegmentCache.cs.
| abstract T Lucene.Net.Util.Cache.SegmentCache< T >.CreateValue |
( |
IndexReader |
reader, |
|
|
string |
key |
|
) |
| |
|
protectedpure virtual |
Value creation.
- Parameters
-
| reader | The reader. |
| key | The key to the item under the reader. |
- Returns
- The value.
| virtual T Lucene.Net.Util.Cache.SegmentCache< T >.Get |
( |
IndexReader |
reader, |
|
|
string |
key |
|
) |
| |
|
virtual |
Get the item from the cache.
- Parameters
-
| reader | The IndexReader the cache is from. |
| key | The key of the item under the reader. |
- Returns
- The item from cache.
Definition at line 92 of file SegmentCache.cs.
| override void Lucene.Net.Util.Cache.SegmentCache< T >.Warm |
( |
IndexReader |
reader, |
|
|
string |
key |
|
) |
| |
|
virtual |
| int Lucene.Net.Util.Cache.SegmentCache< T >.KeyCount |
|
get |
The number of outermost keys in the collection.
Definition at line 72 of file SegmentCache.cs.
The documentation for this class was generated from the following file: