K - V - public class InvalidatedNearRemoteCache<K,V> extends DelegatingRemoteCache<K,V>
RemoteCache implementation enablingdelegatedefaultLifespan, defaultMaxIdleTime| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
clearAsync()
Asynchronous version of
Map.clear(). |
static <K,V> InvalidatedNearRemoteCache<K,V> |
delegatingNearCache(RemoteCacheImpl<K,V> remoteCache,
NearCacheService<K,V> nearCacheService) |
CompletableFuture<V> |
getAsync(Object key)
Asynchronous version of
Map.get(Object) that allows user code to
retrieve the value associated with a key at a later stage, hence allowing
multiple parallel get requests to be sent. |
CompletableFuture<MetadataValue<V>> |
getWithMetadataAsync(K key)
Asynchronously returns the
MetadataValue associated to the supplied key param, or null if it doesn't exist. |
CompletableFuture<Void> |
putAllAsync(Map<? extends K,? extends V> map,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit)
Adds or overrides each specified entry in the remote cache.
|
CompletableFuture<V> |
putAsync(K key,
V value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit)
Asynchronous version of
BasicCache.put(Object, Object, long, TimeUnit, long, TimeUnit). |
CompletableFuture<V> |
removeAsync(Object key)
Asynchronous version of
BasicCache.remove(Object). |
CompletableFuture<Boolean> |
removeWithVersionAsync(K key,
long version) |
CompletableFuture<V> |
replaceAsync(K key,
V value,
long lifespan,
TimeUnit lifespanUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit)
Asynchronous version of
BasicCache.replace(Object, Object, long, TimeUnit, long, TimeUnit). |
CompletableFuture<Boolean> |
replaceWithVersionAsync(K key,
V newValue,
long version,
long lifespan,
TimeUnit lifespanTimeUnit,
long maxIdleTime,
TimeUnit maxIdleTimeUnit) |
void |
start()
Invoked on component start
|
void |
stop()
Invoked on component stop
|
addClientListener, addClientListener, clientStatistics, computeAsync, computeIfAbsentAsync, computeIfPresentAsync, containsKeyAsync, containsValue, entryIterator, entrySet, execute, getAllAsync, getCacheTopologyInfo, getDataFormat, getListeners, getName, getOperationsFactory, getProtocolVersion, getRemoteCacheManager, getVersion, hasForceReturnFlag, init, init, isEmpty, isObjectStorage, isTransactional, keyAsObjectIfNeeded, keyIterator, keySet, keyToBytes, mergeAsync, publishEntries, publishEntriesByQuery, publishEntriesWithMetadata, putIfAbsentAsync, removeAsync, removeClientListener, replaceAll, replaceAsync, resolveStorage, retrieveEntries, retrieveEntriesByQuery, retrieveEntriesWithMetadata, serverStatistics, sizeAsync, streaming, values, withDataFormat, withFlagsclear, compute, compute, compute, computeAsync, computeAsync, computeIfAbsent, computeIfAbsent, computeIfAbsent, computeIfAbsentAsync, computeIfAbsentAsync, computeIfPresent, computeIfPresent, computeIfPresent, computeIfPresentAsync, computeIfPresentAsync, containsKey, get, getAll, getWithMetadata, merge, merge, merge, mergeAsync, mergeAsync, put, put, put, putAll, putAll, putAll, putAllAsync, putAllAsync, putAsync, putAsync, putIfAbsent, putIfAbsent, putIfAbsent, putIfAbsentAsync, putIfAbsentAsync, remove, remove, removeWithVersion, replace, replace, replace, replace, replace, replace, replaceAsync, replaceAsync, replaceAsync, replaceAsync, replaceWithVersion, replaceWithVersion, replaceWithVersion, replaceWithVersion, replaceWithVersionAsync, replaceWithVersionAsync, replaceWithVersionAsync, sizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitremoveEntry, removeEntryentrySet, execute, getAll, getWithMetadata, keySet, putAll, putAll, putAll, putAllAsync, putAllAsync, remove, remove, removeWithVersion, replace, replace, replace, replaceWithVersion, replaceWithVersion, replaceWithVersion, replaceWithVersion, replaceWithVersionAsync, replaceWithVersionAsync, replaceWithVersionAsync, retrieveEntries, retrieveEntries, stats, valuescompute, compute, computeIfAbsent, computeIfAbsent, computeIfPresent, computeIfPresent, merge, merge, put, put, put, putIfAbsent, putIfAbsent, replace, replacecomputeAsync, computeAsync, computeIfAbsentAsync, computeIfAbsentAsync, computeIfPresentAsync, computeIfPresentAsync, mergeAsync, mergeAsync, putAsync, putAsync, putIfAbsentAsync, putIfAbsentAsync, replaceAsync, replaceAsync, replaceAsync, replaceAsynccompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, replacegetTransactionManagerpublic static <K,V> InvalidatedNearRemoteCache<K,V> delegatingNearCache(RemoteCacheImpl<K,V> remoteCache, NearCacheService<K,V> nearCacheService)
public CompletableFuture<V> getAsync(Object key)
AsyncCacheMap.get(Object) that allows user code to
retrieve the value associated with a key at a later stage, hence allowing
multiple parallel get requests to be sent. Normally, when this method
detects that the value is likely to be retrieved from from a remote
entity, it will span a different thread in order to allow the
asynchronous get call to return immediately. If the call will definitely
resolve locally, for example when the cache is configured with LOCAL mode
and no stores are configured, the get asynchronous call will act
sequentially and will have no different to Map.get(Object).getAsync in interface AsyncCache<K,V>getAsync in class DelegatingRemoteCache<K,V>key - key to retrieveMap.get(Object)public CompletableFuture<MetadataValue<V>> getWithMetadataAsync(K key)
RemoteCacheMetadataValue associated to the supplied key param, or null if it doesn't exist.getWithMetadataAsync in interface RemoteCache<K,V>getWithMetadataAsync in class DelegatingRemoteCache<K,V>public CompletableFuture<V> putAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
AsyncCacheBasicCache.put(Object, Object, long, TimeUnit, long, TimeUnit). This method does not block
on remote calls, even if your cache mode is synchronous.putAsync in interface AsyncCache<K,V>putAsync in class DelegatingRemoteCache<K,V>key - key to usevalue - value to storelifespan - lifespan of entrylifespanUnit - time unit for lifespanmaxIdleTime - the maximum amount of time this key is allowed to be idle for before it is considered as
expiredmaxIdleTimeUnit - time unit for max idle timepublic CompletableFuture<Void> putAllAsync(Map<? extends K,? extends V> map, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
RemoteCacheputAllAsync in interface RemoteCache<K,V>putAllAsync in interface AsyncCache<K,V>putAllAsync in class DelegatingRemoteCache<K,V>map - to storelifespan - lifespan of entrylifespanUnit - time unit for lifespanmaxIdleTime - the maximum amount of time this key is allowed to be idle for before it is considered as
expiredmaxIdleTimeUnit - time unit for max idle timeRemoteCache.putAll(java.util.Map, long, java.util.concurrent.TimeUnit)public CompletableFuture<V> replaceAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
AsyncCacheBasicCache.replace(Object, Object, long, TimeUnit, long, TimeUnit). This method does not
block on remote calls, even if your cache mode is synchronous.replaceAsync in interface AsyncCache<K,V>replaceAsync in class DelegatingRemoteCache<K,V>key - key to removevalue - value to storelifespan - lifespan of entrylifespanUnit - time unit for lifespanmaxIdleTime - the maximum amount of time this key is allowed to be idle for before it is considered as
expiredmaxIdleTimeUnit - time unit for max idle timepublic CompletableFuture<Boolean> replaceWithVersionAsync(K key, V newValue, long version, long lifespan, TimeUnit lifespanTimeUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit)
replaceWithVersionAsync in interface RemoteCache<K,V>replaceWithVersionAsync in class DelegatingRemoteCache<K,V>RemoteCache.replaceWithVersion(Object, Object, long)public CompletableFuture<V> removeAsync(Object key)
AsyncCacheBasicCache.remove(Object). This method does not block on remote calls, even if your cache
mode is synchronous.removeAsync in interface AsyncCache<K,V>removeAsync in class DelegatingRemoteCache<K,V>key - key to removepublic CompletableFuture<Boolean> removeWithVersionAsync(K key, long version)
removeWithVersionAsync in interface RemoteCache<K,V>removeWithVersionAsync in class DelegatingRemoteCache<K,V>RemoteCache.remove(Object, Object)public CompletableFuture<Void> clearAsync()
AsyncCacheMap.clear(). This method does not block on remote calls, even if your cache mode is
synchronous.clearAsync in interface AsyncCache<K,V>clearAsync in class DelegatingRemoteCache<K,V>public void start()
LifecycleCopyright © 2022 JBoss by Red Hat. All rights reserved.