Class RemoteCacheSupport<K,V>
- All Implemented Interfaces:
ConcurrentMap<K,,V> Map<K,,V> RemoteCache<K,,V> AsyncCache<K,,V> BasicCache<K,,V> Lifecycle,TransactionalCache
- Direct Known Subclasses:
DelegatingRemoteCache,RemoteCacheImpl
- Since:
- 4.1
- Author:
- Mircea.Markus@jboss.com
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected longprotected long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedRemoteCacheSupport(long defaultLifespan, long defaultMaxIdleTime) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclear()final Vfinal Vcompute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit) An overloaded form ofConcurrentMap.compute(Object, BiFunction)which takes in lifespan parameters.final Vcompute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) An overloaded form ofConcurrentMap.compute(Object, BiFunction)which takes in lifespan and maxIdleTime parameters.final CompletableFuture<V>computeAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) Asynchronous version ofConcurrentMap.compute(Object, BiFunction).final CompletableFuture<V>computeAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit) Asynchronous version ofBasicCache.compute(Object, BiFunction, long, TimeUnit).abstract CompletableFuture<V>computeAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Asynchronous version ofBasicCache.compute(Object, BiFunction, long, TimeUnit, long, TimeUnit).final VcomputeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction) final VcomputeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit) An overloaded form ofConcurrentMap.computeIfAbsent(Object, Function)which takes in lifespan parameters.final VcomputeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) An overloaded form ofConcurrentMap.computeIfAbsent(Object, Function)which takes in lifespan and maxIdleTime parameters.final CompletableFuture<V>computeIfAbsentAsync(K key, Function<? super K, ? extends V> mappingFunction) Asynchronous version ofConcurrentMap.computeIfAbsent(Object, Function).final CompletableFuture<V>computeIfAbsentAsync(K key, Function<? super K, ? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit) Asynchronous version ofBasicCache.computeIfAbsent(Object, Function, long, TimeUnit).abstract CompletableFuture<V>computeIfAbsentAsync(K key, Function<? super K, ? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Asynchronous version ofBasicCache.computeIfAbsent(Object, Function, long, TimeUnit, long, TimeUnit).final VcomputeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) final VcomputeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit) An overloaded form ofConcurrentMap.computeIfPresent(Object, BiFunction)which takes in lifespan parameters.final VcomputeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) An overloaded form ofConcurrentMap.computeIfPresent(Object, BiFunction)which takes in lifespan and maxIdleTime parameters.final CompletableFuture<V>computeIfPresentAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) Asynchronous version ofConcurrentMap.computeIfPresent(Object, BiFunction).final CompletableFuture<V>computeIfPresentAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit) Asynchronous version ofBasicCache.computeIfPresent(Object, BiFunction, long, TimeUnit).abstract CompletableFuture<V>computeIfPresentAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Asynchronous version ofBasicCache.computeIfPresent(Object, BiFunction, long, TimeUnit, long, TimeUnit).final booleancontainsKey(Object key) abstract CompletableFuture<Boolean>containsKeyAsync(K key) Asynchronous version ofMap.containsKey(Object)final VRetrieves all of the entries for the provided keys.abstract CompletableFuture<Map<K,V>> getAllAsync(Set<?> keys) TODO This should be in AdvancedCache with getAllabstract CompletableFuture<V>Asynchronous version ofMap.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.final MetadataValue<V>getWithMetadata(K key) Returns theMetadataValueassociated to the supplied key param, or null if it doesn't exist.abstract CompletableFuture<MetadataValue<V>>getWithMetadataAsync(K key) Asynchronously returns theMetadataValueassociated to the supplied key param, or null if it doesn't exist.final Vfinal Vmerge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit) An overloaded form ofConcurrentMap.merge(Object, Object, BiFunction)which takes in lifespan parameters.final Vmerge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) An overloaded form ofConcurrentMap.merge(Object, Object, BiFunction)which takes in lifespan parameters.final CompletableFuture<V>mergeAsync(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) Asynchronous version ofConcurrentMap.merge(Object, Object, BiFunction).final CompletableFuture<V>mergeAsync(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit) Asynchronous version ofBasicCache.merge(Object, Object, BiFunction, long, TimeUnit).abstract CompletableFuture<V>mergeAsync(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) Asynchronous version ofBasicCache.merge(Object, Object, BiFunction, long, TimeUnit, long, TimeUnit).final VIf the return value of this operation will be ignored by the application, the user is strongly encouraged to use theFlag.IGNORE_RETURN_VALUESflag when invoking this method in order to make it behave as efficiently as possible (i.e.final VAn overloaded form ofBasicCache.put(Object, Object), which takes in lifespan parameters.final Vput(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) An overloaded form ofBasicCache.put(Object, Object), which takes in lifespan parameters.final voidAdds or overrides each specified entry in the remote cache.final voidAdds or overrides each specified entry in the remote cache.final voidputAll(Map<? extends K, ? extends V> map, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) Adds or overrides each specified entry in the remote cache.final CompletableFuture<Void>putAllAsync(Map<? extends K, ? extends V> data) Adds or overrides each specified entry in the remote cache.final CompletableFuture<Void>putAllAsync(Map<? extends K, ? extends V> data, long lifespan, TimeUnit unit) Adds or overrides each specified entry in the remote cache.abstract CompletableFuture<Void>putAllAsync(Map<? extends K, ? extends V> data, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Adds or overrides each specified entry in the remote cache.final CompletableFuture<V>Asynchronous version ofBasicCache.put(Object, Object).final CompletableFuture<V>Asynchronous version ofBasicCache.put(Object, Object, long, TimeUnit).abstract CompletableFuture<V>Asynchronous version ofBasicCache.put(Object, Object, long, TimeUnit, long, TimeUnit).final VputIfAbsent(K key, V value) final VputIfAbsent(K key, V value, long lifespan, TimeUnit unit) An overloaded form ofConcurrentMap.putIfAbsent(Object, Object), which takes in lifespan parameters.final VputIfAbsent(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) An overloaded form ofConcurrentMap.putIfAbsent(Object, Object), which takes in lifespan parameters.final CompletableFuture<V>putIfAbsentAsync(K key, V value) Asynchronous version ofConcurrentMap.putIfAbsent(Object, Object).final CompletableFuture<V>putIfAbsentAsync(K key, V value, long lifespan, TimeUnit lifespanUnit) Asynchronous version ofBasicCache.putIfAbsent(Object, Object, long, TimeUnit).abstract CompletableFuture<V>putIfAbsentAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Asynchronous version ofBasicCache.putIfAbsent(Object, Object, long, TimeUnit, long, TimeUnit).final VIf the return value of this operation will be ignored by the application, the user is strongly encouraged to use theFlag.IGNORE_RETURN_VALUESflag when invoking this method in order to make it behave as efficiently as possible (i.e.final booleanabstract CompletableFuture<V>removeAsync(Object key) Asynchronous version ofBasicCache.remove(Object).abstract CompletableFuture<Boolean>removeAsync(Object key, Object value) Asynchronous version ofConcurrentMap.remove(Object, Object).final booleanremoveWithVersion(K key, long version) Removes the given entry only if its version matches the supplied version.abstract CompletableFuture<Boolean>removeWithVersionAsync(K key, long version) final Vfinal VAn overloaded form ofConcurrentMap.replace(Object, Object), which takes in lifespan parameters.final Vreplace(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) An overloaded form ofConcurrentMap.replace(Object, Object), which takes in lifespan parameters.final booleanfinal booleanAn overloaded form ofConcurrentMap.replace(Object, Object, Object), which takes in lifespan parameters.final booleanreplace(K key, V oldValue, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) An overloaded form ofConcurrentMap.replace(Object, Object, Object), which takes in lifespan parameters.abstract voidreplaceAll(BiFunction<? super K, ? super V, ? extends V> function) final CompletableFuture<V>replaceAsync(K key, V value) Asynchronous version ofConcurrentMap.replace(Object, Object).final CompletableFuture<V>replaceAsync(K key, V value, long lifespan, TimeUnit unit) Asynchronous version ofBasicCache.replace(Object, Object, long, TimeUnit).abstract CompletableFuture<V>replaceAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Asynchronous version ofBasicCache.replace(Object, Object, long, TimeUnit, long, TimeUnit).final CompletableFuture<Boolean>replaceAsync(K key, V oldValue, V newValue) Asynchronous version ofConcurrentMap.replace(Object, Object, Object).final CompletableFuture<Boolean>replaceAsync(K key, V oldValue, V newValue, long lifespan, TimeUnit unit) Asynchronous version ofBasicCache.replace(Object, Object, Object, long, TimeUnit).abstract CompletableFuture<Boolean>replaceAsync(K key, V oldValue, V newValue, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Asynchronous version ofBasicCache.replace(Object, Object, Object, long, TimeUnit, long, TimeUnit).final booleanreplaceWithVersion(K key, V newValue, long version) Replaces the given value only if its version matches the supplied version.final booleanreplaceWithVersion(K key, V newValue, long version, int lifespanSeconds) A overloaded form ofRemoteCache.replaceWithVersion(Object, Object, long)which takes in lifespan parameters.final booleanreplaceWithVersion(K key, V newValue, long version, int lifespanSeconds, int maxIdleTimeSeconds) A overloaded form ofRemoteCache.replaceWithVersion(Object, Object, long)which takes in lifespan and maximum idle time parameters.final booleanreplaceWithVersion(K key, V newValue, long version, long lifespan, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit) A overloaded form ofRemoteCache.replaceWithVersion(Object, Object, long)which takes in lifespan and maximum idle time parameters.final CompletableFuture<Boolean>replaceWithVersionAsync(K key, V newValue, long version) final CompletableFuture<Boolean>replaceWithVersionAsync(K key, V newValue, long version, int lifespanSeconds) final CompletableFuture<Boolean>replaceWithVersionAsync(K key, V newValue, long version, int lifespanSeconds, int maxIdleSeconds) final intsize()abstract CompletableFuture<Long>Asynchronous version ofMap.size().Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.commons.api.AsyncCache
clearAsyncMethods inherited from interface org.infinispan.commons.api.BasicCache
getName, getVersionMethods inherited from interface java.util.concurrent.ConcurrentMap
forEach, getOrDefaultMethods inherited from interface java.util.Map
containsValue, equals, hashCode, isEmptyMethods inherited from interface org.infinispan.client.hotrod.RemoteCache
addClientListener, addClientListener, clientStatistics, entrySet, entrySet, execute, execute, execute, getCacheTopologyInfo, getDataFormat, getListeners, getProtocolVersion, getRemoteCacheContainer, getRemoteCacheManager, isTransactional, keySet, keySet, publishEntries, publishEntriesByQuery, publishEntriesWithMetadata, removeClientListener, replaceWithVersionAsync, retrieveEntries, retrieveEntries, retrieveEntries, retrieveEntriesByQuery, retrieveEntriesWithMetadata, serverStatistics, serverStatisticsAsync, stats, streaming, values, values, withDataFormat, withFlagsMethods inherited from interface org.infinispan.commons.api.TransactionalCache
getTransactionManager
-
Field Details
-
defaultLifespan
protected long defaultLifespan -
defaultMaxIdleTime
protected long defaultMaxIdleTime
-
-
Constructor Details
-
RemoteCacheSupport
protected RemoteCacheSupport() -
RemoteCacheSupport
protected RemoteCacheSupport(long defaultLifespan, long defaultMaxIdleTime)
-
-
Method Details
-
putAll
Description copied from interface:RemoteCacheAdds or overrides each specified entry in the remote cache. This operation provides better performance than calling put() for each entry. -
putAll
Description copied from interface:RemoteCacheAdds or overrides each specified entry in the remote cache. This operation provides better performance than calling put() for each entry.- Specified by:
putAllin interfaceBasicCache<K,V> - Specified by:
putAllin interfaceRemoteCache<K,V> - Parameters:
map- map containing mappings to enterlifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.unit- unit of measurement for the lifespan
-
putAll
public final void putAll(Map<? extends K, ? extends V> map, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) Description copied from interface:RemoteCacheAdds or overrides each specified entry in the remote cache. This operation provides better performance than calling put() for each entry.- Specified by:
putAllin interfaceBasicCache<K,V> - Specified by:
putAllin interfaceRemoteCache<K,V> - Parameters:
map- map containing mappings to enterlifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.lifespanUnit- 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 time- See Also:
-
putAllAsync
Description copied from interface:RemoteCacheAdds or overrides each specified entry in the remote cache. This operation provides better performance than calling put() for each entry.- Specified by:
putAllAsyncin interfaceAsyncCache<K,V> - Specified by:
putAllAsyncin interfaceRemoteCache<K,V> - Parameters:
data- to store- Returns:
- a future containing a void return type
- See Also:
-
putAllAsync
public final CompletableFuture<Void> putAllAsync(Map<? extends K, ? extends V> data, long lifespan, TimeUnit unit) Description copied from interface:RemoteCacheAdds or overrides each specified entry in the remote cache. This operation provides better performance than calling put() for each entry.- Specified by:
putAllAsyncin interfaceAsyncCache<K,V> - Specified by:
putAllAsyncin interfaceRemoteCache<K,V> - Parameters:
data- to storelifespan- lifespan of entryunit- time unit for lifespan- Returns:
- a future containing a void return type
- See Also:
-
putAllAsync
public abstract CompletableFuture<Void> putAllAsync(Map<? extends K, ? extends V> data, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Description copied from interface:RemoteCacheAdds or overrides each specified entry in the remote cache. This operation provides better performance than calling put() for each entry.- Specified by:
putAllAsyncin interfaceAsyncCache<K,V> - Specified by:
putAllAsyncin interfaceRemoteCache<K,V> - Parameters:
data- to storelifespan- lifespan of entrylifespanUnit- time unit for lifespanmaxIdle- the maximum amount of time this key is allowed to be idle for before it is considered as expiredmaxIdleUnit- time unit for max idle time- Returns:
- a future containing a void return type
- See Also:
-
putIfAbsent
- Specified by:
putIfAbsentin interfaceConcurrentMap<K,V> - Specified by:
putIfAbsentin interfaceMap<K,V>
-
putIfAbsent
Description copied from interface:BasicCacheAn overloaded form ofConcurrentMap.putIfAbsent(Object, Object), which takes in lifespan parameters.- Specified by:
putIfAbsentin interfaceBasicCache<K,V> - Parameters:
key- key to usevalue- value to storelifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.unit- unit of measurement for the lifespan- Returns:
- the value being replaced, or null if nothing is being replaced.
-
putIfAbsent
public final V putIfAbsent(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) Description copied from interface:BasicCacheAn overloaded form ofConcurrentMap.putIfAbsent(Object, Object), which takes in lifespan parameters.- Specified by:
putIfAbsentin interfaceBasicCache<K,V> - Parameters:
key- key to usevalue- value to storelifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.lifespanUnit- 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 time- Returns:
- the value being replaced, or null if nothing is being replaced.
-
putIfAbsentAsync
Description copied from interface:AsyncCacheAsynchronous version ofConcurrentMap.putIfAbsent(Object, Object). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
putIfAbsentAsyncin interfaceAsyncCache<K,V> - Parameters:
key- key to usevalue- value to store- Returns:
- a future containing the old value replaced.
-
putIfAbsentAsync
public final CompletableFuture<V> putIfAbsentAsync(K key, V value, long lifespan, TimeUnit lifespanUnit) Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.putIfAbsent(Object, Object, long, TimeUnit). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
putIfAbsentAsyncin interfaceAsyncCache<K,V> - Parameters:
key- key to usevalue- value to storelifespan- lifespan of entrylifespanUnit- time unit for lifespan- Returns:
- a future containing the old value replaced
-
putIfAbsentAsync
public abstract CompletableFuture<V> putIfAbsentAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.putIfAbsent(Object, Object, long, TimeUnit, long, TimeUnit). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
putIfAbsentAsyncin interfaceAsyncCache<K,V> - Parameters:
key- key to usevalue- value to storelifespan- lifespan of entrylifespanUnit- time unit for lifespanmaxIdle- the maximum amount of time this key is allowed to be idle for before it is considered as expiredmaxIdleUnit- time unit for max idle time- Returns:
- a future containing the old value replaced
-
replace
Description copied from interface:RemoteCacheThis method requires 2 round trips to the server. The first to retrieve the value and version and a second to replace the key with the version if the value matches. If possible user should use
RemoteCache.getWithMetadata(Object)andRemoteCache.replaceWithVersion(Object, Object, long). -
replace
Description copied from interface:RemoteCacheAn overloaded form ofConcurrentMap.replace(Object, Object, Object), which takes in lifespan parameters.This method requires 2 round trips to the server. The first to retrieve the value and version and a second to replace the key with the version if the value matches. If possible user should use
RemoteCache.getWithMetadata(Object)andRemoteCache.replaceWithVersion(Object, Object, long, long, TimeUnit, long, TimeUnit).- Specified by:
replacein interfaceBasicCache<K,V> - Specified by:
replacein interfaceRemoteCache<K,V> - Parameters:
key- key to useoldValue- value to replacevalue- value to storelifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.unit- unit of measurement for the lifespan- Returns:
- true if the value was replaced, false otherwise
-
replace
public final boolean replace(K key, V oldValue, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) Description copied from interface:RemoteCacheAn overloaded form ofConcurrentMap.replace(Object, Object, Object), which takes in lifespan parameters.This method requires 2 round trips to the server. The first to retrieve the value and version and a second to replace the key with the version if the value matches. If possible user should use
RemoteCache.getWithMetadata(Object)andRemoteCache.replaceWithVersion(Object, Object, long, long, TimeUnit, long, TimeUnit)if possible.- Specified by:
replacein interfaceBasicCache<K,V> - Specified by:
replacein interfaceRemoteCache<K,V> - Parameters:
key- key to useoldValue- value to replacevalue- value to storelifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.lifespanUnit- 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 time- Returns:
- true if the value was replaced, false otherwise
-
replaceAsync
Description copied from interface:AsyncCacheAsynchronous version ofConcurrentMap.replace(Object, Object, Object). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
replaceAsyncin interfaceAsyncCache<K,V> - Parameters:
key- key to removeoldValue- value to overwritenewValue- value to store- Returns:
- a future containing a boolean, indicating whether the entry was replaced or not
-
replaceAsync
public final CompletableFuture<Boolean> replaceAsync(K key, V oldValue, V newValue, long lifespan, TimeUnit unit) Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.replace(Object, Object, Object, long, TimeUnit). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
replaceAsyncin interfaceAsyncCache<K,V> - Parameters:
key- key to removeoldValue- value to overwritenewValue- value to storelifespan- lifespan of entryunit- time unit for lifespan- Returns:
- a future containing a boolean, indicating whether the entry was replaced or not
-
replaceAsync
public abstract CompletableFuture<Boolean> replaceAsync(K key, V oldValue, V newValue, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.replace(Object, Object, Object, long, TimeUnit, long, TimeUnit). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
replaceAsyncin interfaceAsyncCache<K,V> - Parameters:
key- key to removeoldValue- value to overwritenewValue- value to storelifespan- lifespan of entrylifespanUnit- time unit for lifespanmaxIdle- the maximum amount of time this key is allowed to be idle for before it is considered as expiredmaxIdleUnit- time unit for max idle time- Returns:
- a future containing a boolean, indicating whether the entry was replaced or not
-
replace
-
replace
Description copied from interface:BasicCacheAn overloaded form ofConcurrentMap.replace(Object, Object), which takes in lifespan parameters.- Specified by:
replacein interfaceBasicCache<K,V> - Parameters:
key- key to usevalue- value to storelifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.unit- unit of measurement for the lifespan- Returns:
- the value being replaced, or null if nothing is being replaced.
-
replace
public final V replace(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) Description copied from interface:BasicCacheAn overloaded form ofConcurrentMap.replace(Object, Object), which takes in lifespan parameters.- Specified by:
replacein interfaceBasicCache<K,V> - Parameters:
key- key to usevalue- value to storelifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.lifespanUnit- 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 time- Returns:
- the value being replaced, or null if nothing is being replaced.
-
replaceAsync
Description copied from interface:AsyncCacheAsynchronous version ofConcurrentMap.replace(Object, Object). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
replaceAsyncin interfaceAsyncCache<K,V> - Parameters:
key- key to removevalue- value to store- Returns:
- a future containing the previous value overwritten
-
replaceAsync
Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.replace(Object, Object, long, TimeUnit). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
replaceAsyncin interfaceAsyncCache<K,V> - Parameters:
key- key to removevalue- value to storelifespan- lifespan of entryunit- time unit for lifespan- Returns:
- a future containing the previous value overwritten
-
replaceAsync
public abstract CompletableFuture<V> replaceAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.replace(Object, Object, long, TimeUnit, long, TimeUnit). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
replaceAsyncin interfaceAsyncCache<K,V> - Parameters:
key- key to removevalue- value to storelifespan- lifespan of entrylifespanUnit- time unit for lifespanmaxIdle- the maximum amount of time this key is allowed to be idle for before it is considered as expiredmaxIdleUnit- time unit for max idle time- Returns:
- a future containing the previous value overwritten
-
get
-
getAsync
Description copied from interface:AsyncCacheAsynchronous version ofMap.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 toMap.get(Object).- Specified by:
getAsyncin interfaceAsyncCache<K,V> - Parameters:
key- key to retrieve- Returns:
- a future that can be used to retrieve value associated with the
key when this is available. The actual value returned by the future
follows the same rules as
Map.get(Object)
-
getAll
Description copied from interface:RemoteCacheRetrieves all of the entries for the provided keys. A key will not be present in the resulting map if the entry was not found in the cache.- Specified by:
getAllin interfaceRemoteCache<K,V> - Parameters:
keys- The keys to find values for- Returns:
- The entries that were present for the given keys
-
getAllAsync
Description copied from interface:AsyncCacheTODO This should be in AdvancedCache with getAll- Specified by:
getAllAsyncin interfaceAsyncCache<K,V>
-
getWithMetadata
Description copied from interface:RemoteCacheReturns theMetadataValueassociated to the supplied key param, or null if it doesn't exist.- Specified by:
getWithMetadatain interfaceRemoteCache<K,V>
-
getWithMetadataAsync
Description copied from interface:RemoteCacheAsynchronously returns theMetadataValueassociated to the supplied key param, or null if it doesn't exist.- Specified by:
getWithMetadataAsyncin interfaceRemoteCache<K,V>
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsKeyAsync
Description copied from interface:AsyncCacheAsynchronous version ofMap.containsKey(Object)- Specified by:
containsKeyAsyncin interfaceAsyncCache<K,V> - Parameters:
key- key to retrieve- Returns:
- future containing true if the mapping exists.
-
put
Description copied from interface:BasicCacheIf the return value of this operation will be ignored by the application, the user is strongly encouraged to use theFlag.IGNORE_RETURN_VALUESflag when invoking this method in order to make it behave as efficiently as possible (i.e. avoiding needless remote or network calls). -
put
Description copied from interface:BasicCacheAn overloaded form ofBasicCache.put(Object, Object), which takes in lifespan parameters.- Specified by:
putin interfaceBasicCache<K,V> - Parameters:
key- key to usevalue- value to storelifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.unit- unit of measurement for the lifespan- Returns:
- the value being replaced, or null if nothing is being replaced.
-
put
public final V put(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) Description copied from interface:BasicCacheAn overloaded form ofBasicCache.put(Object, Object), which takes in lifespan parameters.- Specified by:
putin interfaceBasicCache<K,V> - Parameters:
key- key to usevalue- value to storelifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.lifespanUnit- 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 time- Returns:
- the value being replaced, or null if nothing is being replaced.
-
putAsync
Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.put(Object, Object). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
putAsyncin interfaceAsyncCache<K,V> - Parameters:
key- key to usevalue- value to store- Returns:
- a future containing the old value replaced.
-
putAsync
Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.put(Object, Object, long, TimeUnit). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
putAsyncin interfaceAsyncCache<K,V> - Parameters:
key- key to usevalue- value to storelifespan- lifespan of entryunit- time unit for lifespan- Returns:
- a future containing the old value replaced
-
putAsync
public abstract CompletableFuture<V> putAsync(K key, V value, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.put(Object, Object, long, TimeUnit, long, TimeUnit). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
putAsyncin interfaceAsyncCache<K,V> - Parameters:
key- key to usevalue- value to storelifespan- lifespan of entrylifespanUnit- time unit for lifespanmaxIdle- the maximum amount of time this key is allowed to be idle for before it is considered as expiredmaxIdleUnit- time unit for max idle time- Returns:
- a future containing the old value replaced
-
replaceWithVersion
Description copied from interface:RemoteCacheReplaces the given value only if its version matches the supplied version. SeeRemoteCache.removeWithVersion(Object, long)for a sample usage of the version-based methods.- Specified by:
replaceWithVersionin interfaceRemoteCache<K,V> version- numeric version that should match the one in the server for the operation to succeed- Returns:
- true if the value has been replaced
- See Also:
-
replaceWithVersion
Description copied from interface:RemoteCacheA overloaded form ofRemoteCache.replaceWithVersion(Object, Object, long)which takes in lifespan parameters.- Specified by:
replaceWithVersionin interfaceRemoteCache<K,V> - Parameters:
key- key to usenewValue- new value to be associated with the keyversion- numeric version that should match the one in the server for the operation to succeedlifespanSeconds- lifespan of the entry- Returns:
- true if the value was replaced
-
replaceWithVersion
public final boolean replaceWithVersion(K key, V newValue, long version, int lifespanSeconds, int maxIdleTimeSeconds) Description copied from interface:RemoteCacheA overloaded form ofRemoteCache.replaceWithVersion(Object, Object, long)which takes in lifespan and maximum idle time parameters.- Specified by:
replaceWithVersionin interfaceRemoteCache<K,V> - Parameters:
key- key to usenewValue- new value to be associated with the keyversion- numeric version that should match the one in the server for the operation to succeedlifespanSeconds- lifespan of the entrymaxIdleTimeSeconds- the maximum amount of time this key is allowed to be idle for before it is considered as expired- Returns:
- true if the value was replaced
-
replaceWithVersion
public final boolean replaceWithVersion(K key, V newValue, long version, long lifespan, TimeUnit lifespanTimeUnit, long maxIdle, TimeUnit maxIdleTimeUnit) Description copied from interface:RemoteCacheA overloaded form ofRemoteCache.replaceWithVersion(Object, Object, long)which takes in lifespan and maximum idle time parameters.- Specified by:
replaceWithVersionin interfaceRemoteCache<K,V> - Parameters:
key- key to usenewValue- new value to be associated with the keyversion- numeric version that should match the one in the server for the operation to succeedlifespan- lifespan of the entrylifespanTimeUnit-TimeUnitfor lifespanmaxIdle- the maximum amount of time this key is allowed to be idle for before it is considered as expiredmaxIdleTimeUnit-TimeUnitfor maxIdle- Returns:
- true if the value was replaced
-
replaceWithVersionAsync
- Specified by:
replaceWithVersionAsyncin interfaceRemoteCache<K,V> - See Also:
-
replaceWithVersionAsync
public final CompletableFuture<Boolean> replaceWithVersionAsync(K key, V newValue, long version, int lifespanSeconds) - Specified by:
replaceWithVersionAsyncin interfaceRemoteCache<K,V> - See Also:
-
replaceWithVersionAsync
public final CompletableFuture<Boolean> replaceWithVersionAsync(K key, V newValue, long version, int lifespanSeconds, int maxIdleSeconds) - Specified by:
replaceWithVersionAsyncin interfaceRemoteCache<K,V> - See Also:
-
remove
Description copied from interface:RemoteCacheIf the return value of this operation will be ignored by the application, the user is strongly encouraged to use theFlag.IGNORE_RETURN_VALUESflag when invoking this method in order to make it behave as efficiently as possible (i.e. avoiding needless remote or network calls).The returned value is only sent back if
Flag.FORCE_RETURN_VALUEis enabled. -
removeAsync
Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.remove(Object). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
removeAsyncin interfaceAsyncCache<K,V> - Parameters:
key- key to remove- Returns:
- a future containing the value removed
-
remove
Description copied from interface:RemoteCacheThis method requires 2 round trips to the server. The first to retrieve the value and version and a second to remove the key with the version if the value matches. If possible user should use
RemoteCache.getWithMetadata(Object)andRemoteCache.removeWithVersion(Object, long). -
removeAsync
Description copied from interface:AsyncCacheAsynchronous version ofConcurrentMap.remove(Object, Object). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
removeAsyncin interfaceAsyncCache<K,V> - Parameters:
key- key to removevalue- value to match on- Returns:
- a future containing a boolean, indicating whether the entry was removed or not
-
removeWithVersion
Description copied from interface:RemoteCacheRemoves the given entry only if its version matches the supplied version. A typical use case looks like this:VersionedEntry ve = remoteCache.getVersioned(key); //some processing remoteCache.removeWithVersion(key, ve.getVersion();
Lat call (removeWithVersion) will make sure that the entry will only be removed if it hasn't been changed in between.- Specified by:
removeWithVersionin interfaceRemoteCache<K,V> - Returns:
- true if the entry has been removed
- See Also:
-
removeWithVersionAsync
- Specified by:
removeWithVersionAsyncin interfaceRemoteCache<K,V> - See Also:
-
merge
-
merge
public final V merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit) Description copied from interface:BasicCacheAn overloaded form ofConcurrentMap.merge(Object, Object, BiFunction)which takes in lifespan parameters.- Specified by:
mergein interfaceBasicCache<K,V> - Parameters:
key- key to usevalue- new value to merge with existing valueremappingFunction- function to use to merge new and existing values into a merged value to store under keylifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.lifespanUnit- time unit for lifespan- Returns:
- the merged value that was stored under key
-
merge
public final V merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) Description copied from interface:BasicCacheAn overloaded form ofConcurrentMap.merge(Object, Object, BiFunction)which takes in lifespan parameters.- Specified by:
mergein interfaceBasicCache<K,V> - Parameters:
key- key to usevalue- new value to merge with existing valueremappingFunction- function to use to merge new and existing values into a merged value to store under keylifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.lifespanUnit- 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 time- Returns:
- the merged value that was stored under key
-
mergeAsync
public final CompletableFuture<V> mergeAsync(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction) Description copied from interface:AsyncCacheAsynchronous version ofConcurrentMap.merge(Object, Object, BiFunction). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
mergeAsyncin interfaceAsyncCache<K,V>
-
mergeAsync
public final CompletableFuture<V> mergeAsync(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit) Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.merge(Object, Object, BiFunction, long, TimeUnit). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
mergeAsyncin interfaceAsyncCache<K,V>
-
mergeAsync
public abstract CompletableFuture<V> mergeAsync(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.merge(Object, Object, BiFunction, long, TimeUnit, long, TimeUnit). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
mergeAsyncin interfaceAsyncCache<K,V>
-
clear
public final void clear() -
compute
-
compute
public final V compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit) Description copied from interface:BasicCacheAn overloaded form ofConcurrentMap.compute(Object, BiFunction)which takes in lifespan parameters.- Specified by:
computein interfaceBasicCache<K,V> - Parameters:
key- key to useremappingFunction- function to use to compute and store the value under keylifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.lifespanUnit- time unit for lifespan- Returns:
- the computed value that was stored under key
-
compute
public final V compute(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) Description copied from interface:BasicCacheAn overloaded form ofConcurrentMap.compute(Object, BiFunction)which takes in lifespan and maxIdleTime parameters.- Specified by:
computein interfaceBasicCache<K,V> - Parameters:
key- key to useremappingFunction- function to use to compute and store the value under keylifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.lifespanUnit- 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 time- Returns:
- the computed value that was stored under key
-
computeAsync
public final CompletableFuture<V> computeAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) Description copied from interface:AsyncCacheAsynchronous version ofConcurrentMap.compute(Object, BiFunction). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
computeAsyncin interfaceAsyncCache<K,V>
-
computeAsync
public final CompletableFuture<V> computeAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit) Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.compute(Object, BiFunction, long, TimeUnit). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
computeAsyncin interfaceAsyncCache<K,V>
-
computeAsync
public abstract CompletableFuture<V> computeAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.compute(Object, BiFunction, long, TimeUnit, long, TimeUnit). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
computeAsyncin interfaceAsyncCache<K,V>
-
computeIfAbsent
- Specified by:
computeIfAbsentin interfaceConcurrentMap<K,V> - Specified by:
computeIfAbsentin interfaceMap<K,V>
-
computeIfAbsent
public final V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit) Description copied from interface:BasicCacheAn overloaded form ofConcurrentMap.computeIfAbsent(Object, Function)which takes in lifespan parameters.- Specified by:
computeIfAbsentin interfaceBasicCache<K,V> - Parameters:
key- key to usemappingFunction- function to use to compute and store the value under key, if the key is absentlifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.lifespanUnit- time unit for lifespan- Returns:
- the computed value that was stored under key
-
computeIfAbsent
public final V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) Description copied from interface:BasicCacheAn overloaded form ofConcurrentMap.computeIfAbsent(Object, Function)which takes in lifespan and maxIdleTime parameters.- Specified by:
computeIfAbsentin interfaceBasicCache<K,V> - Parameters:
key- key to usemappingFunction- function to use to compute and store the value under key, if the key is absentlifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.lifespanUnit- 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 time- Returns:
- the computed value that was stored under key
-
computeIfAbsentAsync
public final CompletableFuture<V> computeIfAbsentAsync(K key, Function<? super K, ? extends V> mappingFunction) Description copied from interface:AsyncCacheAsynchronous version ofConcurrentMap.computeIfAbsent(Object, Function). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
computeIfAbsentAsyncin interfaceAsyncCache<K,V>
-
computeIfAbsentAsync
public final CompletableFuture<V> computeIfAbsentAsync(K key, Function<? super K, ? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit) Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.computeIfAbsent(Object, Function, long, TimeUnit). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
computeIfAbsentAsyncin interfaceAsyncCache<K,V>
-
computeIfAbsentAsync
public abstract CompletableFuture<V> computeIfAbsentAsync(K key, Function<? super K, ? extends V> mappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.computeIfAbsent(Object, Function, long, TimeUnit, long, TimeUnit). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
computeIfAbsentAsyncin interfaceAsyncCache<K,V>
-
computeIfPresent
public final V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) - Specified by:
computeIfPresentin interfaceConcurrentMap<K,V> - Specified by:
computeIfPresentin interfaceMap<K,V>
-
computeIfPresent
public final V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit) Description copied from interface:BasicCacheAn overloaded form ofConcurrentMap.computeIfPresent(Object, BiFunction)which takes in lifespan parameters.- Specified by:
computeIfPresentin interfaceBasicCache<K,V> - Parameters:
key- key to useremappingFunction- function to use to compute and store the value under key, if such existslifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.lifespanUnit- time unit for lifespan- Returns:
- the computed value that was stored under key
-
computeIfPresent
public final V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdleTime, TimeUnit maxIdleTimeUnit) Description copied from interface:BasicCacheAn overloaded form ofConcurrentMap.computeIfPresent(Object, BiFunction)which takes in lifespan and maxIdleTime parameters.- Specified by:
computeIfPresentin interfaceBasicCache<K,V> - Parameters:
key- key to useremappingFunction- function to use to compute and store the value under key, if such existslifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.lifespanUnit- 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 time- Returns:
- the computed value that was stored under key
-
computeIfPresentAsync
public final CompletableFuture<V> computeIfPresentAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) Description copied from interface:AsyncCacheAsynchronous version ofConcurrentMap.computeIfPresent(Object, BiFunction). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
computeIfPresentAsyncin interfaceAsyncCache<K,V>
-
computeIfPresentAsync
public final CompletableFuture<V> computeIfPresentAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit) Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.computeIfPresent(Object, BiFunction, long, TimeUnit). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
computeIfPresentAsyncin interfaceAsyncCache<K,V>
-
computeIfPresentAsync
public abstract CompletableFuture<V> computeIfPresentAsync(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction, long lifespan, TimeUnit lifespanUnit, long maxIdle, TimeUnit maxIdleUnit) Description copied from interface:AsyncCacheAsynchronous version ofBasicCache.computeIfPresent(Object, BiFunction, long, TimeUnit, long, TimeUnit). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
computeIfPresentAsyncin interfaceAsyncCache<K,V>
-
replaceAll
- Specified by:
replaceAllin interfaceConcurrentMap<K,V> - Specified by:
replaceAllin interfaceMap<K,V>
-
size
public final int size() -
sizeAsync
Description copied from interface:AsyncCacheAsynchronous version ofMap.size(). This method does not block on remote calls, even if your cache mode is synchronous.- Specified by:
sizeAsyncin interfaceAsyncCache<K,V> - Returns:
- a future containing the count of the cache
-