|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConfigurableCacheMap
An extension to the CacheMap interface that supports runtime configuration and monitoring of various caching properties.
Nested Class Summary | |
---|---|
static interface |
ConfigurableCacheMap.Entry A cache Entry carries information additional to the base Map Entry in order to support eviction and expiry. |
static interface |
ConfigurableCacheMap.EvictionApprover EvictionApprover is used to approve the eviction of an entry from the underlying ConfigurableCacheMap. |
static interface |
ConfigurableCacheMap.EvictionPolicy An eviction policy is an object that the cache provides with access information, and when requested, the eviction policy selects and evicts entries from the cache. |
static interface |
ConfigurableCacheMap.UnitCalculator A unit calculator is an object that can calculate the cost of caching an object. |
Field Summary |
---|
Fields inherited from interface com.tangosol.net.cache.CacheMap |
---|
EXPIRY_DEFAULT, EXPIRY_NEVER |
Method Summary | |
---|---|
void |
evict() Evict all entries from the cache that are no longer valid, and potentially prune the cache size if the cache is size-limited and its size is above the caching low water mark. |
void |
evict(java.lang.Object oKey) Evict a specified key from the cache, as if it had expired from the cache. |
void |
evictAll(java.util.Collection colKeys) Evict the specified keys from the cache, as if they had each expired from the cache. |
ConfigurableCacheMap.Entry |
getCacheEntry(java.lang.Object oKey) Locate a cache Entry in the cache based on its key. |
ConfigurableCacheMap.EvictionApprover |
getEvictionApprover() Obtain the registered EvictionApprover. |
ConfigurableCacheMap.EvictionPolicy |
getEvictionPolicy() Obtain the current EvictionPolicy used by the cache. |
int |
getExpiryDelay() Determine the default "time to live" for each individual cache entry. |
int |
getHighUnits() Determine the limit of the cache size in units. |
int |
getLowUnits() Determine the point to which the cache will shrink when it prunes. |
ConfigurableCacheMap.UnitCalculator |
getUnitCalculator() Obtain the current UnitCalculator used by the cache. |
int |
getUnitFactor() Determine the factor by which the Units, LowUnits and HighUnits properties are adjusted. |
int |
getUnits() Determine the number of units that the cache currently stores. |
void |
setEvictionApprover(ConfigurableCacheMap.EvictionApprover approver) Set the EvictionApprover for this ConfigurableCacheMap. |
void |
setEvictionPolicy(ConfigurableCacheMap.EvictionPolicy policy) Set the EvictionPolicy for the cache to use. |
void |
setExpiryDelay(int cMillis) Specify the default "time to live" for cache entries. |
void |
setHighUnits(int cMax) Update the maximum size of the cache in units. |
void |
setLowUnits(int cUnits) Specify the point to which the cache will shrink when it prunes. |
void |
setUnitCalculator(ConfigurableCacheMap.UnitCalculator calculator) Set the UnitCalculator for the cache to use. |
void |
setUnitFactor(int nFactor) Determine the factor by which the Units, LowUnits and HighUnits properties are adjusted. |
Methods inherited from interface com.tangosol.net.cache.CacheMap |
---|
getAll, put, put |
Methods inherited from interface com.tangosol.util.ObservableMap |
---|
addMapListener, addMapListener, addMapListener, removeMapListener, removeMapListener, removeMapListener |
Methods inherited from interface java.util.Map |
---|
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, values |
Method Detail |
---|
int getUnits()
Note: It is expected that the return type will be widened to a long in Coherence 4.
int getHighUnits()
Note: It is expected that the return type will be widened to a long in Coherence 4.
void setHighUnits(int cMax)
Note: It is expected that the parameter will be widened to a long in Coherence 4.
cMax
- the new maximum size of the cache, in unitsint getLowUnits()
Note: It is expected that the parameter will be widened to a long in Coherence 4.
void setLowUnits(int cUnits)
Note: It is expected that the parameter will be widened to a long in Coherence 4.
cUnits
- the number of units that the cache prunes toint getUnitFactor()
Note: This property exists only to avoid changing the type of the units, low units and high units properties from 32-bit values to 64-bit values. It is expected that the parameter will be dropped in Coherence 4.
void setUnitFactor(int nFactor)
Note: This property exists only to avoid changing the type of the units, low units and high units properties from 32-bit values to 64-bit values. It is expected that the parameter will be dropped in Coherence 4.
nFactor
- the units factor; the default is 1void evict(java.lang.Object oKey)
oKey
- the key to evict from the cachevoid evictAll(java.util.Collection colKeys)
The result of this method is defined to be semantically the same as the following implementation:
for (Iterator iter = colKeys.iterator(); iter.hasNext(); ) { Object oKey = iter.next(); evict(oKey); }
colKeys
- a collection of keys to evict from the cachevoid evict()
ConfigurableCacheMap.EvictionApprover getEvictionApprover()
void setEvictionApprover(ConfigurableCacheMap.EvictionApprover approver)
approver
- the EvictionApproverint getExpiryDelay()
void setExpiryDelay(int cMillis)
cMillis
- the number of milliseconds that cache entries will live, or zero to disable automatic expiryConfigurableCacheMap.Entry getCacheEntry(java.lang.Object oKey)
oKey
- the key object to search forConfigurableCacheMap.EvictionPolicy getEvictionPolicy()
void setEvictionPolicy(ConfigurableCacheMap.EvictionPolicy policy)
policy
- an EvictionPolicyConfigurableCacheMap.UnitCalculator getUnitCalculator()
void setUnitCalculator(ConfigurableCacheMap.UnitCalculator calculator)
calculator
- a UnitCalculator
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |