|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tangosol.util.Base
com.tangosol.net.cache.CachingMap
com.tangosol.net.cache.NearCache
com.tangosol.net.cache.VersionedNearCache
public class VersionedNearCache
A near cache that fronts a Distributed Cache and uses a Replicated Cache of version data to keep the local cache in sync.
Nested Class Summary | |
---|---|
class |
VersionedNearCache.VersionCacheListener
Deprecated. A map listener that listens to the VersionCache and invalidates local entries accordingly. |
Nested classes/interfaces inherited from class com.tangosol.net.cache.NearCache |
---|
NearCache.BackServiceListener |
Nested classes/interfaces inherited from class com.tangosol.net.cache.CachingMap |
---|
CachingMap.BackMapListener, CachingMap.FrontMapListener |
Nested classes/interfaces inherited from interface com.tangosol.util.QueryMap |
---|
QueryMap.Entry |
Nested classes/interfaces inherited from interface com.tangosol.util.InvocableMap |
---|
InvocableMap.Entry, InvocableMap.EntryAggregator, InvocableMap.EntryProcessor, InvocableMap.ParallelAwareAggregator |
Field Summary |
---|
Fields inherited from class com.tangosol.net.cache.NearCache |
---|
m_listenerBackService |
Fields inherited from class com.tangosol.net.cache.CachingMap |
---|
LISTEN_ALL, LISTEN_AUTO, LISTEN_NONE, LISTEN_PRESENT, m_nStrategyCurrent, m_nStrategyTarget |
Fields inherited from interface com.tangosol.net.cache.CacheMap |
---|
EXPIRY_DEFAULT, EXPIRY_NEVER |
Fields inherited from interface com.tangosol.util.ConcurrentMap |
---|
LOCK_ALL |
Constructor Summary | |
---|---|
VersionedNearCache(Map mapLocal,
NamedCache mapDist,
NamedCache mapVersion)
Deprecated. Construct a VersionedNearCache. |
Method Summary | |
---|---|
Object |
get(Object oKey)
Deprecated. Returns the value to which this map maps the specified key. |
Map |
getAll(Collection colKeys)
Deprecated. Get all the specified keys, if they are in the cache. |
NamedCache |
getVersionCache()
Deprecated. Obtain the NamedCache object that holds the version data. |
protected void |
incrementVersion(Object oKey,
Object oValue)
Deprecated. Increment value's version. |
protected MapListener |
instantiateVersionCacheListener()
Deprecated. Factory method: Provide a MapListener that listens to the VersionCache and invalidates local entries accordingly. |
boolean |
lock(Object oKey,
long lMillis)
Deprecated. Attempt to lock the specified item within the specified period of time. |
Object |
put(Object oKey,
Object oValue,
boolean fReturn,
long cMillis)
Deprecated. Implementation of put method that optionally skips the return value retrieval and allows to specify an expiry for the cache entry. |
void |
putAll(Map map)
Deprecated. Copy all of the mappings from the specified map to this map. |
void |
release()
Deprecated. Invalidate the CachingMap. |
Object |
remove(Object oKey)
Deprecated. Removes the mapping for this key from this map if present. |
boolean |
unlock(Object oKey)
Deprecated. Unlock the specified item. |
protected void |
updateVersion(Object oKey,
Object oValue)
Deprecated. Update value's version in the version cache. |
Methods inherited from class com.tangosol.net.cache.NearCache |
---|
addIndex, addMapListener, addMapListener, addMapListener, aggregate, aggregate, destroy, entrySet, entrySet, getBackCache, getCacheName, getCacheService, invoke, invokeAll, invokeAll, isActive, keySet, lock, put, registerBackServiceListener, removeIndex, removeMapListener, removeMapListener, removeMapListener, unregisterBackServiceListener |
Methods inherited from interface com.tangosol.net.cache.CacheMap |
---|
put |
Methods inherited from interface com.tangosol.util.ConcurrentMap |
---|
clear, containsKey, containsValue, isEmpty, put, size |
Constructor Detail |
---|
public VersionedNearCache(Map mapLocal, NamedCache mapDist, NamedCache mapVersion)
mapLocal
- local cache to front the distributed cache withmapDist
- distributed cache of Versionable objectsmapVersion
- replicated version cacheMethod Detail |
---|
public void release()
release
in interface NamedCache
release
in class NearCache
CacheService.releaseCache(NamedCache)
public Object get(Object oKey)
get
in interface ConcurrentMap
get
in interface Map
get
in class CachingMap
oKey
- the key object
ConcurrentMap.containsKey(Object)
public Map getAll(Collection colKeys)
Note: this implementation does not differentiate between missing keys or null values stored in the back map; in both cases the returned map will not contain the corresponding entry.
getAll
in interface CacheMap
getAll
in class CachingMap
colKeys
- a collection of keys that may be in the named cache
public Object remove(Object oKey)
remove
in interface ConcurrentMap
remove
in interface Map
remove
in class CachingMap
oKey
- key whose mapping is to be removed from the map
public Object put(Object oKey, Object oValue, boolean fReturn, long cMillis)
put
in class CachingMap
oKey
- the keyoValue
- the valuefReturn
- if true, the return value is required; otherwise
the return value will be ignoredcMillis
- the number of milliseconds until the cache entry will
expire
UnsupportedOperationException
- if the requested expiry is a
positive value and either the front map or the back map
implementations do not support the expiration functionalityCacheMap.put(Object oKey, Object oValue, long cMillis)
public void putAll(Map map)
putAll
in interface ConcurrentMap
putAll
in interface Map
putAll
in class CachingMap
map
- mappings to be stored in this mapprotected void updateVersion(Object oKey, Object oValue)
protected void incrementVersion(Object oKey, Object oValue)
public boolean lock(Object oKey, long lMillis)
lock
in interface ConcurrentMap
lock
in class NearCache
oKey
- key being lockedlMillis
- the number of milliseconds to continue trying to obtain
a lock; pass zero to return immediately; pass -1 to block
the calling thread until the lock could be obtained
public boolean unlock(Object oKey)
unlock
in interface ConcurrentMap
unlock
in class NearCache
oKey
- key being unlocked
protected MapListener instantiateVersionCacheListener()
public NamedCache getVersionCache()
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |