|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.coherence.weblogic.PortalCacheProvider.CacheImpl
com.tangosol.coherence.weblogic.PortalCacheProvider.ReloadableCacheImpl
protected class PortalCacheProvider.ReloadableCacheImpl
CacheImpl extension that supports the ReloadableCache interface.
Nested Class Summary | |
---|---|
protected class |
PortalCacheProvider.ReloadableCacheImpl.ReloadableEntryInfo An EntryInfo extension that contains additional metadata about a cached Map.Entry that can be refreshed using a CacheReloader. |
Nested classes/interfaces inherited from class com.tangosol.coherence.weblogic.PortalCacheProvider.CacheImpl |
---|
PortalCacheProvider.CacheImpl.EntryInfo |
Field Summary |
---|
Fields inherited from class com.tangosol.coherence.weblogic.PortalCacheProvider.CacheImpl |
---|
m_cache, m_cacheLocal, m_fEnabled, m_mapEntryInfo, m_setLocalClass, m_sName |
Fields inherited from interface com.bea.p13n.cache.CacheDefaults |
---|
DEFAULT_ENABLED, DEFAULT_MAX_ENTRIES, DEFAULT_TTL, MAX_ENTRIES_MAX, TTL_NEVER_EXPIRE |
Constructor Summary | |
---|---|
protected |
PortalCacheProvider.ReloadableCacheImpl(String sName, NamedCache cache) Create a new CacheImpl. |
Method Summary | |
---|---|
protected boolean |
compactEntryInfoMap(Map map, Object oKey, PortalCacheProvider.CacheImpl.EntryInfo info) Remove the given EntryInfo from the specified Map if it is safe to do so. |
Object |
get(Object oKey) Return the cached value associated with the given key. |
com.bea.p13n.cache.CacheReloader |
getReloader(Object oKey) Return the CacheReloader used for the given key or null if no CacheReloader is currently set. |
protected PortalCacheProvider.CacheImpl.EntryInfo |
instantiateEntryInfo(boolean fLocal) Factory pattern: Create a new EntryInfo. |
protected PortalCacheProvider.ReloadableCacheImpl.ReloadableEntryInfo |
instantiateReloadableEntryInfo(boolean fLocal, com.bea.p13n.cache.CacheReloader reloader, long cMillis) Factory pattern: Create a new ReloadableEntryInfo. |
Object |
put(Object oKey, Object oValue, long cMillis) Cache the given value with the specified time-to-live. |
Object |
put(Object oKey, Object oValue, long cMillis, com.bea.p13n.cache.CacheReloader reloader) Cache the given value with a specific time-to-live and specify a CacheReloader used to reload the value when that time-to-live expires. |
void |
reload(Object oKey) Run the CacheReloader associated with the given key to refresh the value in the cache. |
protected Object |
reload(Object oKey, Object oValueOld, PortalCacheProvider.ReloadableCacheImpl.ReloadableEntryInfo info) Reload the value for the given key using the CacheReloader associated with the specified EntryInfo and place the new value into the delegate NamedCache. |
void |
setReloader(Object oKey, com.bea.p13n.cache.CacheReloader reloader) Set the CacheReloader to be run when a cached object has expired. |
com.bea.p13n.cache.CacheReloader |
unsetReloader(Object oKey) Remove the CacheReloader used for the given key. |
Methods inherited from class com.tangosol.coherence.weblogic.PortalCacheProvider.CacheImpl |
---|
clear, containsKey, ensureLocalCache, entrySet, flush, flush, getCacheProvider, getDescription, getEntryInfoMap, getHitCount, getHitRate, getLocalCache, getLocalClassSet, getMaxEntries, getMissCount, getName, getNamedCache, getTtl, instantiateEntryInfoMap, instantiateLocalCache, isEnabled, keySet, put, put, put, release, remove, resetStats, setEnabled, setMaxEntries, setTtl, size, toString |
Constructor Detail |
---|
protected PortalCacheProvider.ReloadableCacheImpl(String sName, NamedCache cache)
sName
- the name of the Cache; must not be nullcache
- the delegate NamedCache; must not be nullMethod Detail |
---|
public com.bea.p13n.cache.CacheReloader getReloader(Object oKey)
getReloader
in interface com.bea.p13n.cache.ReloadableCache
getReloader
in class PortalCacheProvider.CacheImpl
oKey
- the target keypublic void setReloader(Object oKey, com.bea.p13n.cache.CacheReloader reloader)
get()
is called with the specified key and the entry has expired, the given CacheReloader is used to reload the object and refresh the Cache. Requests for cached objects without an associated CacheReloader will return null in this situation. <p/> This method has no effect if the Cache is disabled.setReloader
in interface com.bea.p13n.cache.ReloadableCache
setReloader
in class PortalCacheProvider.CacheImpl
oKey
- the key to add (or replace) the CacheReloader forreloader
- the new CacheReloader (or null to remove the current CacheReloader)public com.bea.p13n.cache.CacheReloader unsetReloader(Object oKey)
unsetReloader
in interface com.bea.p13n.cache.ReloadableCache
unsetReloader
in class PortalCacheProvider.CacheImpl
oKey
- the target keypublic Object put(Object oKey, Object oValue, long cMillis, com.bea.p13n.cache.CacheReloader reloader)
put
in interface com.bea.p13n.cache.ReloadableCache
put
in class PortalCacheProvider.CacheImpl
oKey
- key with which the specified value is to be cached; must not be nulloValue
- value to cache; must not be nullcMillis
- the time-to-live, in milliseconds, of the cached object; this TTL overrides the default TTL for the Cache, and applies only to the given keyreloader
- the CacheReloader to associate with the given keypublic void reload(Object oKey)
reload
in interface com.bea.p13n.cache.ReloadableCache
reload
in class PortalCacheProvider.CacheImpl
oKey
- the target keypublic Object put(Object oKey, Object oValue, long cMillis)
put
in interface com.bea.p13n.cache.Cache
put
in class PortalCacheProvider.CacheImpl
oKey
- the key of the entry to create; must not be nulloValue
- the value to associate with the key; must not be nullcMillis
- the time-to-live, in milliseconds, of the cached object; this TTL overrides the default TTL for the Cache, and applies only to the given keypublic Object get(Object oKey)
get
in interface com.bea.p13n.cache.Cache
get
in class PortalCacheProvider.CacheImpl
oKey
- the target key; must not be nullprotected Object reload(Object oKey, Object oValueOld, PortalCacheProvider.ReloadableCacheImpl.ReloadableEntryInfo info)
oKey
- the key to reloadoValueOld
- the old cached value; may be nullinfo
- the EntryInfo for the given keyprotected boolean compactEntryInfoMap(Map map, Object oKey, PortalCacheProvider.CacheImpl.EntryInfo info)
compactEntryInfoMap
in class PortalCacheProvider.CacheImpl
map
- the Map that contains the EntryInfooKey
- the key used to store the EntryInfo in the given Mapinfo
- the candidate EntryInfoprotected PortalCacheProvider.CacheImpl.EntryInfo instantiateEntryInfo(boolean fLocal)
instantiateEntryInfo
in class PortalCacheProvider.CacheImpl
fLocal
- if true, the corresponding Map.Entry is stored in the local Mapprotected PortalCacheProvider.ReloadableCacheImpl.ReloadableEntryInfo instantiateReloadableEntryInfo(boolean fLocal, com.bea.p13n.cache.CacheReloader reloader, long cMillis)
fLocal
- if true, the corresponding Map.Entry is stored in the local Mapreloader
- the CacheReloader that should be used to reload the corresponding Map.Entry valuecMillis
- the TTL of the corresponding Map.Entry
|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |