public class VersionedNearCache extends NearCache
Modifier and Type | Class and Description |
---|---|
class |
VersionedNearCache.VersionCacheListener
Deprecated.
A map listener that listens to the VersionCache and invalidates local
entries accordingly.
|
NearCache.BackServiceListener
CachingMap.DeactivationListener, CachingMap.FrontMapListener, CachingMap.PrimingListener, CachingMap.SimpleListener
NamedCache.Option
QueryMap.Entry<K,V>
InvocableMap.Entry<K,V>, InvocableMap.EntryAggregator<K,V,R>, InvocableMap.EntryProcessor<K,V,R>, InvocableMap.ParallelAwareAggregator<K,V,P,R>, InvocableMap.StreamingAggregator<K,V,P,R>
f_listenerBackService, f_service, f_sName, f_sServiceName, m_fDestroyed
LISTEN_ALL, LISTEN_AUTO, LISTEN_LOGICAL, LISTEN_NONE, LISTEN_PRESENT, m_listenerDeactivation, m_nStrategyCurrent, m_nStrategyTarget
EXPIRY_DEFAULT, EXPIRY_NEVER
LOCK_ALL
Constructor and Description |
---|
VersionedNearCache(Map mapLocal,
NamedCache mapDist,
NamedCache mapVersion)
Deprecated.
Construct a VersionedNearCache.
|
Modifier and Type | Method and Description |
---|---|
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.
|
addIndex, addMapListener, addMapListener, addMapListener, aggregate, aggregate, destroy, entrySet, entrySet, getBackCache, getCacheName, getCacheService, getContextClassLoader, getRegistrationContext, invoke, invokeAll, invokeAll, isActive, isDestroyed, isReleased, keySet, lock, put, registerBackServiceListener, registerMBean, release, removeIndex, removeMapListener, removeMapListener, removeMapListener, setContextClassLoader, setRegistrationContext, truncate, unregisterBackServiceListener, unregisterMBean
clear, containsKey, containsValue, ensureInvalidationStrategy, entrySet, getAllFromFrontMap, getBackMap, getCacheStatistics, getControlMap, getFrontMap, getInvalidationHits, getInvalidationMisses, getInvalidationStrategy, getTotalRegisterListener, instantiateBackMapListener, instantiateFrontMapListener, invalidateFront, isCheckPrimingExclusively, isCoherent, isEmpty, isPriming, keySet, put, registerDeactivationListener, registerFrontListener, registerListener, registerListener, registerListeners, removeKeyHolder, resetFrontMap, resetInvalidationStrategy, setKeyHolder, size, toString, tryLock, unregisterDeactivationListener, unregisterFrontListener, unregisterListener, unregisterListener, unregisterListeners, validate, values
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values
containsKey, containsValue, isEmpty, put, size
aggregate, compute, compute, computeIfAbsent, computeIfAbsent, computeIfPresent, computeIfPresent, getOrDefault, invokeAll, merge, merge, putIfAbsent, remove, replace, replace, replaceAll, replaceAll, replaceAll, replaceAll, stream, stream, stream, stream, stream, stream
public VersionedNearCache(Map mapLocal, NamedCache mapDist, NamedCache mapVersion)
mapLocal
- local cache to front the distributed cache withmapDist
- distributed cache of Versionable objectsmapVersion
- replicated version cachepublic void release()
release
in interface NamedCache
release
in class NearCache
CacheFactory.releaseCache(NamedCache)
,
ConfigurableCacheFactory.releaseCache(NamedCache)
public Object get(Object oKey)
get
in interface ConcurrentMap
get
in interface Map
get
in class CachingMap
oKey
- the key objectConcurrentMap.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 cachepublic 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 mappublic 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
expireUnsupportedOperationException
- 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)
oKey
- the keyoValue
- the valueprotected void incrementVersion(Object oKey, Object oValue)
oKey
- the keyoValue
- the valuepublic 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 obtainedpublic boolean unlock(Object oKey)
unlock
in interface ConcurrentMap
unlock
in class NearCache
oKey
- key being unlockedprotected MapListener instantiateVersionCacheListener()
public NamedCache getVersionCache()