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 SummaryFieldsModifier and TypeFieldDescriptionprotected longprotected long
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedprotectedRemoteCacheSupport(long defaultLifespan, long defaultMaxIdleTime) 
- 
Method SummaryModifier 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.commons.api.AsyncCacheclearAsyncMethods inherited from interface org.infinispan.commons.api.BasicCachecontinuousQuery, getName, getVersion, queryMethods inherited from interface java.util.concurrent.ConcurrentMapforEach, getOrDefaultMethods inherited from interface java.util.MapcontainsValue, equals, hashCode, isEmptyMethods inherited from interface org.infinispan.client.hotrod.RemoteCacheaddClientListener, addClientListener, clientStatistics, entrySet, entrySet, execute, execute, execute, getCacheTopologyInfo, getDataFormat, getProtocolVersion, getRemoteCacheContainer, getRemoteCacheManager, isTransactional, keySet, keySet, publishEntries, publishEntriesByQuery, publishEntriesWithMetadata, removeClientListener, replaceWithVersionAsync, retrieveEntries, retrieveEntries, retrieveEntries, retrieveEntriesByQuery, retrieveEntriesWithMetadata, serverStatistics, serverStatisticsAsync, streaming, values, values, withDataFormat, withFlagsMethods inherited from interface org.infinispan.commons.api.TransactionalCachegetTransactionManager
- 
Field Details- 
defaultLifespanprotected long defaultLifespan
- 
defaultMaxIdleTimeprotected long defaultMaxIdleTime
 
- 
- 
Constructor Details- 
RemoteCacheSupportprotected RemoteCacheSupport()
- 
RemoteCacheSupportprotected RemoteCacheSupport(long defaultLifespan, long defaultMaxIdleTime) 
 
- 
- 
Method Details- 
putAllDescription copied from interface:RemoteCacheAdds or overrides each specified entry in the remote cache. This operation provides better performance than calling put() for each entry.
- 
putAllDescription 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 interface- BasicCache<K,- V> 
- Specified by:
- putAllin interface- RemoteCache<K,- V> 
- Parameters:
- map- map containing mappings to enter
- lifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.
- unit- unit of measurement for the lifespan
 
- 
putAllpublic 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 interface- BasicCache<K,- V> 
- Specified by:
- putAllin interface- RemoteCache<K,- V> 
- Parameters:
- map- map containing mappings to enter
- lifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.
- lifespanUnit- time unit for lifespan
- maxIdleTime- the maximum amount of time this key is allowed to be idle for before it is considered as expired
- maxIdleTimeUnit- time unit for max idle time
- See Also:
 
- 
putAllAsyncDescription 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 interface- AsyncCache<K,- V> 
- Specified by:
- putAllAsyncin interface- RemoteCache<K,- V> 
- Parameters:
- data- to store
- Returns:
- a future containing a void return type
- See Also:
 
- 
putAllAsyncpublic 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 interface- AsyncCache<K,- V> 
- Specified by:
- putAllAsyncin interface- RemoteCache<K,- V> 
- Parameters:
- data- to store
- lifespan- lifespan of entry
- unit- time unit for lifespan
- Returns:
- a future containing a void return type
- See Also:
 
- 
putAllAsyncpublic 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 interface- AsyncCache<K,- V> 
- Specified by:
- putAllAsyncin interface- RemoteCache<K,- V> 
- Parameters:
- data- to store
- lifespan- lifespan of entry
- lifespanUnit- time unit for lifespan
- maxIdle- the maximum amount of time this key is allowed to be idle for before it is considered as expired
- maxIdleUnit- time unit for max idle time
- Returns:
- a future containing a void return type
- See Also:
 
- 
putIfAbsent- Specified by:
- putIfAbsentin interface- ConcurrentMap<K,- V> 
- Specified by:
- putIfAbsentin interface- Map<K,- V> 
 
- 
putIfAbsentDescription copied from interface:BasicCacheAn overloaded form ofConcurrentMap.putIfAbsent(Object, Object), which takes in lifespan parameters.- Specified by:
- putIfAbsentin interface- BasicCache<K,- V> 
- Parameters:
- key- key to use
- value- value to store
- lifespan- 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.
 
- 
putIfAbsentpublic 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 interface- BasicCache<K,- V> 
- Parameters:
- key- key to use
- value- value to store
- lifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.
- lifespanUnit- time unit for lifespan
- maxIdleTime- the maximum amount of time this key is allowed to be idle for before it is considered as expired
- maxIdleTimeUnit- time unit for max idle time
- Returns:
- the value being replaced, or null if nothing is being replaced.
 
- 
putIfAbsentAsyncDescription 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 interface- AsyncCache<K,- V> 
- Parameters:
- key- key to use
- value- value to store
- Returns:
- a future containing the old value replaced.
 
- 
putIfAbsentAsyncpublic 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 interface- AsyncCache<K,- V> 
- Parameters:
- key- key to use
- value- value to store
- lifespan- lifespan of entry
- lifespanUnit- time unit for lifespan
- Returns:
- a future containing the old value replaced
 
- 
putIfAbsentAsyncpublic 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 interface- AsyncCache<K,- V> 
- Parameters:
- key- key to use
- value- value to store
- lifespan- lifespan of entry
- lifespanUnit- time unit for lifespan
- maxIdle- the maximum amount of time this key is allowed to be idle for before it is considered as expired
- maxIdleUnit- time unit for max idle time
- Returns:
- a future containing the old value replaced
 
- 
replaceDescription 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).
- 
replaceDescription 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 interface- BasicCache<K,- V> 
- Specified by:
- replacein interface- RemoteCache<K,- V> 
- Parameters:
- key- key to use
- oldValue- value to replace
- value- value to store
- lifespan- 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
 
- 
replacepublic 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 interface- BasicCache<K,- V> 
- Specified by:
- replacein interface- RemoteCache<K,- V> 
- Parameters:
- key- key to use
- oldValue- value to replace
- value- value to store
- lifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.
- lifespanUnit- time unit for lifespan
- maxIdleTime- the maximum amount of time this key is allowed to be idle for before it is considered as expired
- maxIdleTimeUnit- time unit for max idle time
- Returns:
- true if the value was replaced, false otherwise
 
- 
replaceAsyncDescription 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 interface- AsyncCache<K,- V> 
- Parameters:
- key- key to remove
- oldValue- value to overwrite
- newValue- value to store
- Returns:
- a future containing a boolean, indicating whether the entry was replaced or not
 
- 
replaceAsyncpublic 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 interface- AsyncCache<K,- V> 
- Parameters:
- key- key to remove
- oldValue- value to overwrite
- newValue- value to store
- lifespan- lifespan of entry
- unit- time unit for lifespan
- Returns:
- a future containing a boolean, indicating whether the entry was replaced or not
 
- 
replaceAsyncpublic 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 interface- AsyncCache<K,- V> 
- Parameters:
- key- key to remove
- oldValue- value to overwrite
- newValue- value to store
- lifespan- lifespan of entry
- lifespanUnit- time unit for lifespan
- maxIdle- the maximum amount of time this key is allowed to be idle for before it is considered as expired
- maxIdleUnit- time unit for max idle time
- Returns:
- a future containing a boolean, indicating whether the entry was replaced or not
 
- 
replace
- 
replaceDescription copied from interface:BasicCacheAn overloaded form ofConcurrentMap.replace(Object, Object), which takes in lifespan parameters.- Specified by:
- replacein interface- BasicCache<K,- V> 
- Parameters:
- key- key to use
- value- value to store
- lifespan- 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.
 
- 
replacepublic 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 interface- BasicCache<K,- V> 
- Parameters:
- key- key to use
- value- value to store
- lifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.
- lifespanUnit- time unit for lifespan
- maxIdleTime- the maximum amount of time this key is allowed to be idle for before it is considered as expired
- maxIdleTimeUnit- time unit for max idle time
- Returns:
- the value being replaced, or null if nothing is being replaced.
 
- 
replaceAsyncDescription 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 interface- AsyncCache<K,- V> 
- Parameters:
- key- key to remove
- value- value to store
- Returns:
- a future containing the previous value overwritten
 
- 
replaceAsyncDescription 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 interface- AsyncCache<K,- V> 
- Parameters:
- key- key to remove
- value- value to store
- lifespan- lifespan of entry
- unit- time unit for lifespan
- Returns:
- a future containing the previous value overwritten
 
- 
replaceAsyncpublic 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 interface- AsyncCache<K,- V> 
- Parameters:
- key- key to remove
- value- value to store
- lifespan- lifespan of entry
- lifespanUnit- time unit for lifespan
- maxIdle- the maximum amount of time this key is allowed to be idle for before it is considered as expired
- maxIdleUnit- time unit for max idle time
- Returns:
- a future containing the previous value overwritten
 
- 
get
- 
getAsyncDescription 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 interface- AsyncCache<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)
 
- 
getAllDescription 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 interface- RemoteCache<K,- V> 
- Parameters:
- keys- The keys to find values for
- Returns:
- The entries that were present for the given keys
 
- 
getAllAsyncDescription copied from interface:AsyncCacheTODO This should be in AdvancedCache with getAll- Specified by:
- getAllAsyncin interface- AsyncCache<K,- V> 
 
- 
getWithMetadataDescription copied from interface:RemoteCacheReturns theMetadataValueassociated to the supplied key param, or null if it doesn't exist.- Specified by:
- getWithMetadatain interface- RemoteCache<K,- V> 
 
- 
getWithMetadataAsyncDescription copied from interface:RemoteCacheAsynchronously returns theMetadataValueassociated to the supplied key param, or null if it doesn't exist.- Specified by:
- getWithMetadataAsyncin interface- RemoteCache<K,- V> 
 
- 
containsKey- Specified by:
- containsKeyin interface- Map<K,- V> 
 
- 
containsKeyAsyncDescription copied from interface:AsyncCacheAsynchronous version ofMap.containsKey(Object)- Specified by:
- containsKeyAsyncin interface- AsyncCache<K,- V> 
- Parameters:
- key- key to retrieve
- Returns:
- future containing true if the mapping exists.
 
- 
putDescription 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).
- 
putDescription copied from interface:BasicCacheAn overloaded form ofBasicCache.put(Object, Object), which takes in lifespan parameters.- Specified by:
- putin interface- BasicCache<K,- V> 
- Parameters:
- key- key to use
- value- value to store
- lifespan- 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.
 
- 
putpublic 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 interface- BasicCache<K,- V> 
- Parameters:
- key- key to use
- value- value to store
- lifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.
- lifespanUnit- time unit for lifespan
- maxIdleTime- the maximum amount of time this key is allowed to be idle for before it is considered as expired
- maxIdleTimeUnit- time unit for max idle time
- Returns:
- the value being replaced, or null if nothing is being replaced.
 
- 
putAsyncDescription 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 interface- AsyncCache<K,- V> 
- Parameters:
- key- key to use
- value- value to store
- Returns:
- a future containing the old value replaced.
 
- 
putAsyncDescription 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 interface- AsyncCache<K,- V> 
- Parameters:
- key- key to use
- value- value to store
- lifespan- lifespan of entry
- unit- time unit for lifespan
- Returns:
- a future containing the old value replaced
 
- 
putAsyncpublic 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 interface- AsyncCache<K,- V> 
- Parameters:
- key- key to use
- value- value to store
- lifespan- lifespan of entry
- lifespanUnit- time unit for lifespan
- maxIdle- the maximum amount of time this key is allowed to be idle for before it is considered as expired
- maxIdleUnit- time unit for max idle time
- Returns:
- a future containing the old value replaced
 
- 
replaceWithVersionDescription 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 interface- RemoteCache<K,- V> 
- Parameters:
- 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:
 
- 
replaceWithVersionDescription copied from interface:RemoteCacheA overloaded form ofRemoteCache.replaceWithVersion(Object, Object, long)which takes in lifespan parameters.- Specified by:
- replaceWithVersionin interface- RemoteCache<K,- V> 
- Parameters:
- key- key to use
- newValue- new value to be associated with the key
- version- numeric version that should match the one in the server for the operation to succeed
- lifespanSeconds- lifespan of the entry
- Returns:
- true if the value was replaced
 
- 
replaceWithVersionpublic 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 interface- RemoteCache<K,- V> 
- Parameters:
- key- key to use
- newValue- new value to be associated with the key
- version- numeric version that should match the one in the server for the operation to succeed
- lifespanSeconds- lifespan of the entry
- maxIdleTimeSeconds- 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
 
- 
replaceWithVersionpublic 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 interface- RemoteCache<K,- V> 
- Parameters:
- key- key to use
- newValue- new value to be associated with the key
- version- numeric version that should match the one in the server for the operation to succeed
- lifespan- lifespan of the entry
- lifespanTimeUnit-- TimeUnitfor lifespan
- maxIdle- the maximum amount of time this key is allowed to be idle for before it is considered as expired
- maxIdleTimeUnit-- TimeUnitfor maxIdle
- Returns:
- true if the value was replaced
 
- 
replaceWithVersionAsync- Specified by:
- replaceWithVersionAsyncin interface- RemoteCache<K,- V> 
- See Also:
 
- 
replaceWithVersionAsyncpublic final CompletableFuture<Boolean> replaceWithVersionAsync(K key, V newValue, long version, int lifespanSeconds) - Specified by:
- replaceWithVersionAsyncin interface- RemoteCache<K,- V> 
- See Also:
 
- 
replaceWithVersionAsyncpublic final CompletableFuture<Boolean> replaceWithVersionAsync(K key, V newValue, long version, int lifespanSeconds, int maxIdleSeconds) - Specified by:
- replaceWithVersionAsyncin interface- RemoteCache<K,- V> 
- See Also:
 
- 
removeDescription 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.
- 
removeAsyncDescription 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 interface- AsyncCache<K,- V> 
- Parameters:
- key- key to remove
- Returns:
- a future containing the value removed
 
- 
removeDescription 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).
- 
removeAsyncDescription 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 interface- AsyncCache<K,- V> 
- Parameters:
- key- key to remove
- value- value to match on
- Returns:
- a future containing a boolean, indicating whether the entry was removed or not
 
- 
removeWithVersionDescription 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 interface- RemoteCache<K,- V> 
- Returns:
- true if the entry has been removed
- See Also:
 
- 
removeWithVersionAsync- Specified by:
- removeWithVersionAsyncin interface- RemoteCache<K,- V> 
- See Also:
 
- 
merge
- 
mergepublic 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 interface- BasicCache<K,- V> 
- Parameters:
- key- key to use
- value- new value to merge with existing value
- remappingFunction- function to use to merge new and existing values into a merged value to store under key
- lifespan- 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
 
- 
mergepublic 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 interface- BasicCache<K,- V> 
- Parameters:
- key- key to use
- value- new value to merge with existing value
- remappingFunction- function to use to merge new and existing values into a merged value to store under key
- lifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.
- lifespanUnit- time unit for lifespan
- maxIdleTime- the maximum amount of time this key is allowed to be idle for before it is considered as expired
- maxIdleTimeUnit- time unit for max idle time
- Returns:
- the merged value that was stored under key
 
- 
mergeAsyncpublic 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 interface- AsyncCache<K,- V> 
 
- 
mergeAsyncpublic 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 interface- AsyncCache<K,- V> 
 
- 
mergeAsyncpublic 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 interface- AsyncCache<K,- V> 
 
- 
clearpublic final void clear()
- 
compute
- 
computepublic 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 interface- BasicCache<K,- V> 
- Parameters:
- key- key to use
- remappingFunction- function to use to compute and store the value under key
- lifespan- 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
 
- 
computepublic 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 interface- BasicCache<K,- V> 
- Parameters:
- key- key to use
- remappingFunction- function to use to compute and store the value under key
- lifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.
- lifespanUnit- time unit for lifespan
- maxIdleTime- the maximum amount of time this key is allowed to be idle for before it is considered as expired
- maxIdleTimeUnit- time unit for max idle time
- Returns:
- the computed value that was stored under key
 
- 
computeAsyncpublic 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 interface- AsyncCache<K,- V> 
 
- 
computeAsyncpublic 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 interface- AsyncCache<K,- V> 
 
- 
computeAsyncpublic 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 interface- AsyncCache<K,- V> 
 
- 
computeIfAbsent- Specified by:
- computeIfAbsentin interface- ConcurrentMap<K,- V> 
- Specified by:
- computeIfAbsentin interface- Map<K,- V> 
 
- 
computeIfAbsentpublic 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 interface- BasicCache<K,- V> 
- Parameters:
- key- key to use
- mappingFunction- function to use to compute and store the value under key, if the key is absent
- lifespan- 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
 
- 
computeIfAbsentpublic 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 interface- BasicCache<K,- V> 
- Parameters:
- key- key to use
- mappingFunction- function to use to compute and store the value under key, if the key is absent
- lifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.
- lifespanUnit- time unit for lifespan
- maxIdleTime- the maximum amount of time this key is allowed to be idle for before it is considered as expired
- maxIdleTimeUnit- time unit for max idle time
- Returns:
- the computed value that was stored under key
 
- 
computeIfAbsentAsyncpublic 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 interface- AsyncCache<K,- V> 
 
- 
computeIfAbsentAsyncpublic 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 interface- AsyncCache<K,- V> 
 
- 
computeIfAbsentAsyncpublic 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 interface- AsyncCache<K,- V> 
 
- 
computeIfPresentpublic final V computeIfPresent(K key, BiFunction<? super K, ? super V, ? extends V> remappingFunction) - Specified by:
- computeIfPresentin interface- ConcurrentMap<K,- V> 
- Specified by:
- computeIfPresentin interface- Map<K,- V> 
 
- 
computeIfPresentpublic 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 interface- BasicCache<K,- V> 
- Parameters:
- key- key to use
- remappingFunction- function to use to compute and store the value under key, if such exists
- lifespan- 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
 
- 
computeIfPresentpublic 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 interface- BasicCache<K,- V> 
- Parameters:
- key- key to use
- remappingFunction- function to use to compute and store the value under key, if such exists
- lifespan- lifespan of the entry. Negative values are interpreted as unlimited lifespan.
- lifespanUnit- time unit for lifespan
- maxIdleTime- the maximum amount of time this key is allowed to be idle for before it is considered as expired
- maxIdleTimeUnit- time unit for max idle time
- Returns:
- the computed value that was stored under key
 
- 
computeIfPresentAsyncpublic 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 interface- AsyncCache<K,- V> 
 
- 
computeIfPresentAsyncpublic 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 interface- AsyncCache<K,- V> 
 
- 
computeIfPresentAsyncpublic 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 interface- AsyncCache<K,- V> 
 
- 
replaceAll- Specified by:
- replaceAllin interface- ConcurrentMap<K,- V> 
- Specified by:
- replaceAllin interface- Map<K,- V> 
 
- 
sizepublic final int size()
- 
sizeAsyncDescription 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 interface- AsyncCache<K,- V> 
- Returns:
- a future containing the count of the cache
 
 
-