|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
K - V - public interface CachingTier<K,V>
This interface is to be implemented by CachingTier that sit above the AuthoritativeTier.
An important contract here is that a value being faulted in get(K, java.util.concurrent.Callable is to be entirely faulted in before it
can become an eviction candidate, i.e. this cache can never evict mappings being faulted in
| Nested Class Summary | |
|---|---|
static interface |
CachingTier.Listener<K,V>
A listener that will be notified when eviction of a mapping happens |
| Method Summary | |
|---|---|
void |
addListener(CachingTier.Listener<K,V> listener)
Adds a CachingTier.Listener to the cache |
void |
clear()
Clears the cache... |
void |
clearAndNotify()
Clears the cache notifying listeners |
boolean |
contains(K key)
Deprecated. |
V |
get(K key,
Callable<V> source,
boolean updateStats)
Returns the value associated with the key, or populates the mapping using the Callable instance |
Policy |
getEvictionPolicy()
Deprecated. |
int |
getInMemorySize()
Deprecated. |
long |
getInMemorySizeInBytes()
Deprecated. |
int |
getOffHeapSize()
Deprecated. |
long |
getOffHeapSizeInBytes()
Deprecated. |
long |
getOnDiskSizeInBytes()
Deprecated. |
boolean |
loadOnPut()
Returns true if values should be loaded to this cache on put. |
void |
recalculateSize(K key)
Deprecated. |
V |
remove(K key)
Removes the mapping associated to the key passed in |
void |
setEvictionPolicy(Policy policy)
Deprecated. |
| Method Detail |
|---|
boolean loadOnPut()
true if values should be loaded to this cache on put.
This may be a dynamic decision, based for example on the occupancy of the cache.
true if values should be loaded on put
V get(K key,
Callable<V> source,
boolean updateStats)
key - the key to look upsource - the source to use, in the case of no mapping presentupdateStats - true to update the stats, false otherwise
V remove(K key)
key - the key to the mapping to remove
void clear()
void clearAndNotify()
void addListener(CachingTier.Listener<K,V> listener)
CachingTier.Listener to the cache
listener - the listener to add@Deprecated int getInMemorySize()
@Deprecated int getOffHeapSize()
@Deprecated boolean contains(K key)
key -
@Deprecated long getInMemorySizeInBytes()
@Deprecated long getOffHeapSizeInBytes()
@Deprecated long getOnDiskSizeInBytes()
@Deprecated void recalculateSize(K key)
key - the key to perform the recalculation for@Deprecated Policy getEvictionPolicy()
@Deprecated void setEvictionPolicy(Policy policy)
policy - the policy to use
|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||