Package com.tangosol.net
Interface AsyncNamedCache<K,V>
-
- Type Parameters:
K
- the type of the cache entry keysV
- the type of the cache entry values
- All Superinterfaces:
AsyncNamedMap<K,V>
public interface AsyncNamedCache<K,V> extends AsyncNamedMap<K,V>
AsynchronousNamedCache
.- Since:
- 12.2.1
- Author:
- as 2015.01.17
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.tangosol.net.AsyncNamedMap
AsyncNamedMap.Complete, AsyncNamedMap.Option, AsyncNamedMap.OrderBy
-
-
Field Summary
-
Fields inherited from interface com.tangosol.net.AsyncNamedMap
ANY
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description NamedCache<K,V>
getNamedCache()
Return theNamedCache
instance thisAsyncNamedCache
is based on.default CompletableFuture<Void>
put(K key, V value, long cMillis)
Associates the specified value with the specified key in this cache.default CompletableFuture<Void>
putAll(Map<? extends K,? extends V> map, long cMillis)
Copies all the mappings from the specified map to this map with the specified expiry delay.-
Methods inherited from interface com.tangosol.net.AsyncNamedMap
aggregate, aggregate, aggregate, clear, compute, computeIfAbsent, computeIfPresent, containsKey, entrySet, entrySet, entrySet, entrySet, entrySet, entrySet, entrySet, get, getAll, getAll, getAll, getAll, getAll, getAll, getNamedMap, getOrDefault, invoke, invokeAll, invokeAll, invokeAll, invokeAll, invokeAll, invokeAll, invokeAll, invokeAll, invokeAll, isEmpty, keySet, keySet, keySet, keySet, merge, put, putAll, putIfAbsent, remove, remove, removeAll, removeAll, replace, replace, replaceAll, replaceAll, replaceAll, size, values, values, values, values, values
-
-
-
-
Method Detail
-
getNamedCache
NamedCache<K,V> getNamedCache()
Return theNamedCache
instance thisAsyncNamedCache
is based on.- Returns:
- the
NamedCache
instance thisAsyncNamedCache
is based on
-
put
default CompletableFuture<Void> put(K key, V value, long cMillis)
Associates the specified value with the specified key in this cache. If the cache previously contained a mapping for this key, the old value is replaced. This variation of theAsyncNamedMap.put(Object oKey, Object oValue)
method allows the caller to specify an expiry (or "time to live") for the cache entry.- Parameters:
key
- key with which the specified value is to be associatedvalue
- value to be associated with the specified keycMillis
- the number of milliseconds until the cache entry will expire, also referred to as the entry's "time to live"; passCacheMap.EXPIRY_DEFAULT
to use the cache's default time-to-live setting; passCacheMap.EXPIRY_NEVER
to indicate that the cache entry should never expire; this milliseconds value is not a date/time value, such as is returned from System.currentTimeMillis()- Returns:
- a
CompletableFuture
-
putAll
default CompletableFuture<Void> putAll(Map<? extends K,? extends V> map, long cMillis)
Copies all the mappings from the specified map to this map with the specified expiry delay. NOTE: This method was introduced in a patch to Coherence. All the cluster members must be running with a compatible version (the patch or higher) for this method to work. SeeDistributedAsyncNamedCache.IS_BINARY_PROCESSOR_COMPATIBLE
- Parameters:
map
- mappings to be added to this mapcMillis
- the number of milliseconds until the cache entry will expire, also referred to as the entry's "time to live"; passCacheMap.EXPIRY_DEFAULT
to use the cache's default time-to-live setting; passCacheMap.EXPIRY_NEVER
to indicate that the cache entry should never expire; this milliseconds value is not a date/time value, such as is returned from System.currentTimeMillis()- Returns:
- a
CompletableFuture
-
-