Package com.tangosol.net.cache
Class VersionedNearCache
java.lang.Object
com.tangosol.net.cache.CachingMap
com.tangosol.net.cache.NearCache
com.tangosol.net.cache.VersionedNearCache
- All Implemented Interfaces:
ClassLoaderAware,CacheMap,NamedCache,NamedCollection,NamedMap,Releasable,ConcurrentMap,InvocableMap,ObservableMap,QueryMap,AutoCloseable,Map
Deprecated.
as of Coherence 3.2 all the functionality of this class has been
superceded by the NearCache implementation
A near cache that fronts a Distributed Cache and uses a Replicated Cache of
version data to keep the local cache in sync.
- Author:
- cp 2002.10.20
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassDeprecated.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.BackServiceListenerNested classes/interfaces inherited from class com.tangosol.net.cache.CachingMap
CachingMap.DeactivationListener, CachingMap.FrontMapListener, CachingMap.PrimingListener, CachingMap.SimpleListenerNested classes/interfaces inherited from interface com.tangosol.util.InvocableMap
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> Nested classes/interfaces inherited from interface com.tangosol.net.NamedMap
NamedMap.OptionNested classes/interfaces inherited from interface com.tangosol.util.QueryMap
QueryMap.Entry<K,V> -
Field Summary
Fields inherited from class com.tangosol.net.cache.NearCache
f_listenerBackService, f_service, f_sName, f_sServiceName, m_fDestroyedFields inherited from class com.tangosol.net.cache.CachingMap
INVALIDATION_STRATEGY, LISTEN_ALL, LISTEN_AUTO, LISTEN_LOGICAL, LISTEN_NONE, LISTEN_PRESENT, m_listenerDeactivation, m_nStrategyCurrent, m_nStrategyTargetFields inherited from interface com.tangosol.net.cache.CacheMap
EXPIRY_DEFAULT, EXPIRY_NEVERFields inherited from interface com.tangosol.util.ConcurrentMap
LOCK_ALL -
Constructor Summary
ConstructorsConstructorDescriptionVersionedNearCache(Map mapLocal, NamedCache mapDist, NamedCache mapVersion) Deprecated.Construct a VersionedNearCache. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Returns the value to which this map maps the specified key.getAll(Collection colKeys) Deprecated.Get all the specified keys, if they are in the cache.Deprecated.Obtain the NamedCache object that holds the version data.protected voidincrementVersion(Object oKey, Object oValue) Deprecated.Increment value's version.protected MapListenerDeprecated.Factory method: Provide a MapListener that listens to the VersionCache and invalidates local entries accordingly.booleanDeprecated.Attempt to lock the specified item within the specified period of time.Deprecated.Implementation of put method that optionally skips the return value retrieval and allows to specify an expiry for the cache entry.voidDeprecated.Copy all of the mappings from the specified map to this map.voidrelease()Deprecated.Invalidate the CachingMap.Deprecated.Removes the mapping for this key from this map if present.booleanDeprecated.Unlock the specified item.protected voidupdateVersion(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, async, computeIfAbsent, computeIfAbsent, destroy, entrySet, entrySet, getBackCache, getCacheName, getCacheService, getContextClassLoader, getOrDefault, getRegistrationContext, invoke, invokeAll, invokeAll, isActive, isDestroyed, isReady, isReleased, keySet, lock, put, registerBackServiceListener, registerMBean, release, removeIndex, removeMapListener, removeMapListener, removeMapListener, setContextClassLoader, setRegistrationContext, truncate, unregisterBackServiceListener, unregisterMBeanMethods inherited from class com.tangosol.net.cache.CachingMap
clear, containsKey, containsValue, ensureInvalidationStrategy, entrySet, getAllFromFrontMap, getBackMap, getCacheStatistics, getControlMap, getFrontMap, getInvalidationHits, getInvalidationMisses, getInvalidationStrategy, 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, valuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.tangosol.util.ConcurrentMap
containsKey, containsValue, isEmpty, put, sizeMethods inherited from interface com.tangosol.util.InvocableMap
aggregate, compute, compute, computeIfPresent, computeIfPresent, invokeAll, merge, merge, putIfAbsent, remove, replace, replace, replaceAll, replaceAll, replaceAll, replaceAll, stream, stream, stream, stream, stream, streamMethods inherited from interface com.tangosol.net.NamedCache
as, async, forEach, viewMethods inherited from interface com.tangosol.net.NamedMap
clear, getName, getServiceMethods inherited from interface com.tangosol.util.QueryMap
addIndex, forEach, forEach, values, valuesMethods inherited from interface com.tangosol.net.Releasable
close
-
Constructor Details
-
VersionedNearCache
Deprecated.Construct a VersionedNearCache.- Parameters:
mapLocal- local cache to front the distributed cache withmapDist- distributed cache of Versionable objectsmapVersion- replicated version cache
-
-
Method Details
-
release
public void release()Deprecated.Invalidate the CachingMap. If the BackMap implements an ObservableMap calling this method is necessary to remove the BackMap listener.- Specified by:
releasein interfaceReleasable- Overrides:
releasein classNearCache
-
get
Deprecated.Returns the value to which this map maps the specified key.- Specified by:
getin interfaceConcurrentMap- Specified by:
getin interfaceMap- Overrides:
getin classCachingMap- Parameters:
oKey- the key object- Returns:
- the value to which this map maps the specified key, or null if the map contains no mapping for this key
- See Also:
-
getAll
Deprecated.Get all the specified keys, if they are in the cache. For each key that is in the cache, that key and its corresponding value will be placed in the map that is returned by this method. The absence of a key in the returned map indicates that it was not in the cache, which may imply (for caches that can load behind the scenes) that the requested data could not be loaded.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.
-
remove
Deprecated.Removes the mapping for this key from this map if present. Expensive: updates both the underlying cache and the local cache.- Specified by:
removein interfaceConcurrentMap- Specified by:
removein interfaceMap- Overrides:
removein classCachingMap- Parameters:
oKey- key whose mapping is to be removed from the map- Returns:
- previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key, if the implementation supports null values.
-
put
Deprecated.Implementation of put method that optionally skips the return value retrieval and allows to specify an expiry for the cache entry.- Overrides:
putin classCachingMap- Parameters:
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- Returns:
- previous value (if required)
- Throws:
UnsupportedOperationException- if the requested expiry is a positive value and either the front map or the back map implementations do not support the expiration functionality- See Also:
-
putAll
Deprecated.Copy all of the mappings from the specified map to this map.- Specified by:
putAllin interfaceConcurrentMap- Specified by:
putAllin interfaceMap- Overrides:
putAllin classCachingMap- Parameters:
map- mappings to be stored in this map
-
updateVersion
Deprecated.Update value's version in the version cache.- Parameters:
oKey- the keyoValue- the value
-
incrementVersion
Deprecated.Increment value's version.- Parameters:
oKey- the keyoValue- the value
-
lock
Deprecated.Attempt to lock the specified item within the specified period of time. Expensive: Locking always occurs on the back cache, and removes the value from the front cache if successful (forcing a get() from the back cache on next access to the key).- Specified by:
lockin interfaceConcurrentMap- Overrides:
lockin classNearCache- Parameters:
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- Returns:
- true if the item was successfully locked within the specified time; false otherwise
-
unlock
Deprecated.Unlock the specified item.- Specified by:
unlockin interfaceConcurrentMap- Overrides:
unlockin classNearCache- Parameters:
oKey- key being unlocked- Returns:
- true if the item was successfully unlocked; false otherwise
-
instantiateVersionCacheListener
Deprecated.Factory method: Provide a MapListener that listens to the VersionCache and invalidates local entries accordingly.- Returns:
- a MapListener object to listen to the VersionCache
-
getVersionCache
Deprecated.Obtain the NamedCache object that holds the version data.- Returns:
- the NamedCache object, which holds just keys and version data
-