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.BackServiceListenerCachingMap.DeactivationListener, CachingMap.FrontMapListener, CachingMap.PrimingListener, CachingMap.SimpleListenerNamedCache.OptionQueryMap.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>m_listenerBackService, m_service, m_sNameLISTEN_ALL, LISTEN_AUTO, LISTEN_LOGICAL, LISTEN_NONE, LISTEN_PRESENT, m_listenerDeactivation, m_nStrategyCurrent, m_nStrategyTargetEXPIRY_DEFAULT, EXPIRY_NEVERLOCK_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, unregisterMBeanclear, containsKey, containsValue, ensureInvalidationStrategy, entrySet, getAllFromFrontMap, getBackMap, getCacheStatistics, getControlMap, getFrontMap, getInvalidationHits, getInvalidationMisses, getInvalidationStrategy, getTotalRegisterListener, instantiateBackMapListener, instantiateFrontMapListener, invalidateFront, isCoherent, isEmpty, isPriming, keySet, put, registerDeactivationListener, registerFrontListener, registerListener, registerListener, registerListeners, removeKeyHolder, resetFrontMap, resetInvalidationStrategy, setKeyHolder, size, toString, tryLock, unregisterDeactivationListener, unregisterFrontListener, unregisterListener, unregisterListener, unregisterListeners, validate, valuesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitas, async, async, clearcompute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, getOrDefault, hashCode, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, valuescontainsKey, containsValue, isEmpty, put, sizeaggregate, compute, compute, computeIfAbsent, computeIfAbsent, computeIfPresent, computeIfPresent, getOrDefault, invokeAll, merge, merge, putIfAbsent, remove, replace, replace, replaceAll, replaceAll, replaceAll, replaceAll, stream, stream, stream, stream, stream, streampublic 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 NamedCacherelease in class NearCacheCacheFactory.releaseCache(NamedCache), ConfigurableCacheFactory.releaseCache(NamedCache)public Object get(Object oKey)
get in interface ConcurrentMapget in interface Mapget in class CachingMapoKey - 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 CacheMapgetAll in class CachingMapcolKeys - a collection of keys that may be in the named cachepublic Object remove(Object oKey)
remove in interface ConcurrentMapremove in interface Mapremove in class CachingMapoKey - key whose mapping is to be removed from the mappublic Object put(Object oKey, Object oValue, boolean fReturn, long cMillis)
put in class CachingMapoKey - 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 ConcurrentMapputAll in interface MapputAll in class CachingMapmap - 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 ConcurrentMaplock in class NearCacheoKey - 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 ConcurrentMapunlock in class NearCacheoKey - key being unlockedprotected MapListener instantiateVersionCacheListener()
public NamedCache getVersionCache()