|
| MemoryCache () |
|
override void | Clear () |
| Clear the cache of all the entries. More...
|
|
bool | Set (object key, object value) |
| Puts an object into the cache with the given key. More...
|
|
bool | TryGet (object key, out object value) |
| Tries to get an object for the given key from the underlying cache system. More...
|
|
object | Remove (Object key) |
| Removes a node for the given key from the cache. More...
|
|
void | Dispose () |
|
object | Remove (object key) |
| Removes an object from the cache. More...
|
|
|
LinkedList< KeyValuePair< object, CacheValue > > | IndexList [get, private set] |
|
virtual int | NodeCount [get] |
| Gets the number of nodes that are currently being stored in the cache. More...
|
|
Definition at line 21 of file MemoryCache.cs.
Deveel.Data.Caching.MemoryCache.MemoryCache |
( |
| ) |
|
|
inline |
Definition at line 29 of file MemoryCache.cs.
30 IndexList =
new LinkedList<KeyValuePair<object, CacheValue>>();
LinkedList< KeyValuePair< object, CacheValue > > IndexList
override void Deveel.Data.Caching.MemoryCache.Clear |
( |
| ) |
|
|
inlinevirtual |
Clear the cache of all the entries.
Reimplemented from Deveel.Data.Caching.Cache.
Definition at line 116 of file MemoryCache.cs.
readonly Dictionary< object, CacheValue > valueCache
LinkedList< KeyValuePair< object, CacheValue > > IndexList
override void Deveel.Data.Caching.MemoryCache.Dispose |
( |
bool |
disposing | ) |
|
|
inlineprotectedvirtual |
virtual CacheValue Deveel.Data.Caching.MemoryCache.GetCacheValueUnlocked |
( |
object |
key | ) |
|
|
inlineprotectedvirtual |
Definition at line 51 of file MemoryCache.cs.
53 return valueCache.TryGetValue(key, out v) ? v : null;
readonly Dictionary< object, CacheValue > valueCache
override object Deveel.Data.Caching.MemoryCache.RemoveObject |
( |
object |
key | ) |
|
|
inlineprotectedvirtual |
object Deveel.Data.Caching.MemoryCache.RemoveUnlocked |
( |
object |
key | ) |
|
|
inlineprotected |
Definition at line 73 of file MemoryCache.cs.
virtual CacheValue GetCacheValueUnlocked(object key)
readonly Dictionary< object, CacheValue > valueCache
LinkedList< KeyValuePair< object, CacheValue > > IndexList
override bool Deveel.Data.Caching.MemoryCache.SetObject |
( |
object |
key, |
|
|
object |
value |
|
) |
| |
|
inlineprotectedvirtual |
When overridden in a derived class, it sets the value for the key given.
- Parameters
-
key | The key corresponding to the value to set. |
value | the value to set into the cache. |
- Returns
- Returns
false
if the key existed and the value was set or otherwise true
if the key was not found and the value was added to the cache.
Implements Deveel.Data.Caching.Cache.
Definition at line 84 of file MemoryCache.cs.
virtual CacheValue SetValueUnlocked(object key, object value)
virtual CacheValue Deveel.Data.Caching.MemoryCache.SetValueUnlocked |
( |
object |
key, |
|
|
object |
value |
|
) |
| |
|
inlineprotectedvirtual |
Definition at line 56 of file MemoryCache.cs.
60 if (cacheValue == null) {
61 cacheValue =
new CacheValue(value);
62 cacheValue.IsNew =
true;
65 cacheValue.Value = value;
66 cacheValue.IsNew =
false;
virtual CacheValue GetCacheValueUnlocked(object key)
virtual void UpdateElementAccess(object key, CacheValue cacheValue)
readonly Dictionary< object, CacheValue > valueCache
override bool Deveel.Data.Caching.MemoryCache.TryGetObject |
( |
object |
key, |
|
|
out object |
value |
|
) |
| |
|
inlineprotectedvirtual |
virtual void Deveel.Data.Caching.MemoryCache.UpdateElementAccess |
( |
object |
key, |
|
|
CacheValue |
cacheValue |
|
) |
| |
|
inlineprotectedvirtual |
Reimplemented in Deveel.Data.Caching.SizeLimitedCache.
Definition at line 37 of file MemoryCache.cs.
39 cacheValue.LastAccess =
DateTime.Now;
40 var idxRef = cacheValue.IndexRef;
44 idxRef =
new LinkedListNode<KeyValuePair<object, CacheValue>>(
new KeyValuePair<object, CacheValue>(key, cacheValue));
45 cacheValue.IndexRef = idxRef;
LinkedList< KeyValuePair< object, CacheValue > > IndexList
long Deveel.Data.Caching.MemoryCache.getTotal = 0 |
|
private |
DateTime Deveel.Data.Caching.MemoryCache.lastCacheAccess = DateTime.MaxValue |
|
private |
readonly object Deveel.Data.Caching.MemoryCache.syncRoot = new object() |
|
private |
long Deveel.Data.Caching.MemoryCache.totalGets = 0 |
|
private |
readonly Dictionary<object, CacheValue> Deveel.Data.Caching.MemoryCache.valueCache = new Dictionary<object, CacheValue>() |
|
private |
LinkedList<KeyValuePair<object, CacheValue> > Deveel.Data.Caching.MemoryCache.IndexList |
|
getprivate setprotected |
The documentation for this class was generated from the following file:
- /var/calculate/remote/distfiles/egit-src/deveeldb.git/src/deveeldb/Deveel.Data.Caching/MemoryCache.cs