public abstract static class Store.Cache extends Object
Store class.| Modifier and Type | Class and Description |
|---|---|
static class |
Store.Cache.HardRef
Cache created objects using hard reference.
|
static class |
Store.Cache.HashTable
Fixed size cache which uses hash table.
|
static class |
Store.Cache.LRU |
static class |
Store.Cache.WeakSoftRef
Instance cache which uses
SoftReference or WeakReference
Items can be removed from cache by Garbage Collector if |
| Modifier and Type | Field and Description |
|---|---|
protected long |
cacheHitCounter |
protected long |
cacheMissCounter |
protected Lock |
lock |
protected static Object |
NULL |
| Constructor and Description |
|---|
Store.Cache(boolean disableLocks) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
clear() |
abstract void |
close() |
abstract Object |
get(long recid) |
long |
metricsCacheHit()
how many times was cache hit, also reset counter
|
long |
metricsCacheMiss()
how many times was cache miss, also reset counter
|
abstract Store.Cache |
newCacheForOtherSegment() |
abstract void |
put(long recid,
Object item) |
protected final Lock lock
protected long cacheHitCounter
protected long cacheMissCounter
protected static final Object NULL
public abstract Object get(long recid)
public abstract void put(long recid,
Object item)
public abstract void clear()
public abstract void close()
public abstract Store.Cache newCacheForOtherSegment()
public long metricsCacheHit()
public long metricsCacheMiss()
Copyright © 2015. All Rights Reserved.