|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.bind.philib.cache.StagedCache<K,V>
public final class StagedCache<K,V>
| Field Summary | |
|---|---|
static int |
DEFAULT_CACHE_CAPACITY
The default capacity of an object cache. |
static int |
DEFAULT_OLD_GEN_AFTER_HITS
|
static double |
DEFAULT_OLD_GEN_RATIO
The default capacity of an object cache. |
static int |
MIN_CACHE_CAPACITY
The minimum capacity of a staged cache. |
| Constructor Summary | |
|---|---|
StagedCache()
|
|
StagedCache(int capacity)
|
|
StagedCache(int capacity,
Cloner<V> valueCloner)
|
|
StagedCache(int capacity,
Cloner<V> valueCloner,
double oldGenRatio,
int oldGenAfterHits)
|
|
| Method Summary | |
|---|---|
void |
add(K key,
V value)
Add a key-value-pair to the cache. |
int |
capacity()
|
void |
clear()
Remove all elements from the cache. |
V |
get(K key)
Query a value from the cache by its key. |
void |
remove(K key)
Remove a key-value-pair from the cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MIN_CACHE_CAPACITY
public static final int DEFAULT_CACHE_CAPACITY
public static final double DEFAULT_OLD_GEN_RATIO
public static final int DEFAULT_OLD_GEN_AFTER_HITS
| Constructor Detail |
|---|
public StagedCache()
public StagedCache(int capacity)
public StagedCache(int capacity,
Cloner<V> valueCloner)
public StagedCache(int capacity,
Cloner<V> valueCloner,
double oldGenRatio,
int oldGenAfterHits)
| Method Detail |
|---|
public void add(K key,
V value)
Cache
add in interface Cache<K,V>public V get(K key)
Cache
get in interface Cache<K,V>public void remove(K key)
Cache
remove in interface Cache<K,V>public int capacity()
capacity in interface Cache<K,V>public void clear()
Cache
clear in interface Cache<K,V>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||