Lucene.Net  3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties
Classes | Public Member Functions | Protected Member Functions | List of all members
Lucene.Net.Util.Cache.SimpleMapCache< TKey, TValue > Class Template Reference

Simple cache implementation that uses a HashMap to store (key, value) pairs. This cache is not synchronized, use Cache{TKey, TValue}.SynchronizedCache(Cache{TKey, TValue}) if needed. More...

Inherits Lucene.Net.Util.Cache.Cache< TKey, TValue >.

Inherited by Lucene.Net.Util.Cache.SimpleLRUCache< TKey, TValue >, and Lucene.Net.Util.Cache.SimpleMapCache< TKey, TValue >.SynchronizedSimpleMapCache.

Public Member Functions

 SimpleMapCache ()
 
 SimpleMapCache (System.Collections.Generic.Dictionary< TKey, TValue > map)
 
override TValue Get (System.Object key)
 Returns the value for the given key.
 
override void Put (TKey key, TValue value_Renamed)
 Puts a (key, value)-pair into the cache.
 
override bool ContainsKey (System.Object key)
 Returns whether the given key is in this cache.
 
virtual
System.Collections.Generic.HashSet
< TKey > 
KeySet ()
 Returns a Set containing all keys in this cache.
 
- Public Member Functions inherited from Lucene.Net.Util.Cache.Cache< TKey, TValue >
void Close ()
 Closes the cache.
 
void Dispose ()
 

Protected Member Functions

override void Dispose (bool disposing)
 

Additional Inherited Members

- Static Public Member Functions inherited from Lucene.Net.Util.Cache.Cache< TKey, TValue >
static Cache< TKey, TValue > SynchronizedCache (Cache< TKey, TValue > cache)
 Returns a thread-safe cache backed by the specified cache. In order to guarantee thread-safety, all access to the backed cache must be accomplished through the returned cache.
 

Detailed Description

Simple cache implementation that uses a HashMap to store (key, value) pairs. This cache is not synchronized, use Cache{TKey, TValue}.SynchronizedCache(Cache{TKey, TValue}) if needed.

Definition at line 28 of file SimpleMapCache.cs.

Constructor & Destructor Documentation

Lucene.Net.Util.Cache.SimpleMapCache< TKey, TValue >.SimpleMapCache ( )

Definition at line 32 of file SimpleMapCache.cs.

Lucene.Net.Util.Cache.SimpleMapCache< TKey, TValue >.SimpleMapCache ( System.Collections.Generic.Dictionary< TKey, TValue >  map)

Definition at line 37 of file SimpleMapCache.cs.

Member Function Documentation

override bool Lucene.Net.Util.Cache.SimpleMapCache< TKey, TValue >.ContainsKey ( System.Object  key)
virtual

Returns whether the given key is in this cache.

Implements Lucene.Net.Util.Cache.Cache< TKey, TValue >.

Definition at line 52 of file SimpleMapCache.cs.

override void Lucene.Net.Util.Cache.SimpleMapCache< TKey, TValue >.Dispose ( bool  disposing)
protectedvirtual

Implements Lucene.Net.Util.Cache.Cache< TKey, TValue >.

Definition at line 57 of file SimpleMapCache.cs.

override TValue Lucene.Net.Util.Cache.SimpleMapCache< TKey, TValue >.Get ( System.Object  key)
virtual

Returns the value for the given key.

Implements Lucene.Net.Util.Cache.Cache< TKey, TValue >.

Definition at line 42 of file SimpleMapCache.cs.

virtual System.Collections.Generic.HashSet<TKey> Lucene.Net.Util.Cache.SimpleMapCache< TKey, TValue >.KeySet ( )
virtual

Returns a Set containing all keys in this cache.

Definition at line 63 of file SimpleMapCache.cs.

override void Lucene.Net.Util.Cache.SimpleMapCache< TKey, TValue >.Put ( TKey  key,
TValue  value_Renamed 
)
virtual

Puts a (key, value)-pair into the cache.

Implements Lucene.Net.Util.Cache.Cache< TKey, TValue >.

Definition at line 47 of file SimpleMapCache.cs.


The documentation for this class was generated from the following file: