K - Type of the Keys.V - Type of the Values.public interface AsyncMap<K,V>
This contract definition does not make any guarantees as to the contents' consistency or concurrent access behavior. Please refer to the actual implementation's documentation for such behavior.
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.CompletableFuture<V> |
get(K key,
java.time.Duration timeout)
Retrieves a value from the Map.
|
java.util.concurrent.CompletableFuture<java.lang.Void> |
put(K key,
V value,
java.time.Duration timeout)
Inserts a new Key-Value pair into the map.
|
java.util.concurrent.CompletableFuture<java.lang.Void> |
remove(K key,
java.time.Duration timeout)
Deletes a Key-Value pair from the Map, if any.
|
java.util.concurrent.CompletableFuture<java.lang.Void> put(K key, V value, java.time.Duration timeout)
key - The Key to insert/update.value - The Value to insert/update.timeout - Timeout for the operation.java.util.concurrent.CompletableFuture<V> get(K key, java.time.Duration timeout)
key - The key to retrieve the value for.timeout - Timeout for the operation.java.util.concurrent.CompletableFuture<java.lang.Void> remove(K key, java.time.Duration timeout)
key - The Key of the pair to remove.timeout - Timeout for the operation.