K
- V
- public interface CachingTier<K,V>
AuthoritativeTier
.
An important contract here is that a value being faulted in get(K, java.util.concurrent.Callable<V>, boolean)
is to be entirely faulted in before it
can become an eviction candidate, i.e. this cache can never evict mappings being faulted inModifier and Type | Interface and Description |
---|---|
static interface |
CachingTier.Listener<K,V>
A listener that will be notified when eviction of a mapping happens
|
Modifier and Type | Method and Description |
---|---|
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.
|
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 putV 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 otherwiseV remove(K key)
key
- the key to the mapping to removevoid clear()
void clearAndNotify()
void addListener(CachingTier.Listener<K,V> listener)
CachingTier.Listener
to the cachelistener
- 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 useCopyright © 2003–2016 Terracotta, Inc.. All rights reserved.