| Modifier and Type | Field and Description |
|---|---|
static TypeArg<AsyncMap> |
__TYPE_ARG |
TypeArg<K> |
__typeArg_0 |
TypeArg<V> |
__typeArg_1 |
| Constructor and Description |
|---|
AsyncMap(io.vertx.core.shareddata.AsyncMap delegate) |
AsyncMap(io.vertx.core.shareddata.AsyncMap delegate,
TypeArg<K> typeArg_0,
TypeArg<V> typeArg_1) |
| Modifier and Type | Method and Description |
|---|---|
CompletionStage<Void> |
clear()
Clear all entries in the map
|
boolean |
equals(Object o) |
CompletionStage<V> |
get(K k)
Get a value from the map, asynchronously.
|
io.vertx.core.shareddata.AsyncMap |
getDelegate() |
int |
hashCode() |
static <K,V> AsyncMap<K,V> |
newInstance(io.vertx.core.shareddata.AsyncMap arg) |
static <K,V> AsyncMap<K,V> |
newInstance(io.vertx.core.shareddata.AsyncMap arg,
TypeArg<K> __typeArg_K,
TypeArg<V> __typeArg_V) |
CompletionStage<Void> |
put(K k,
V v)
Put a value in the map, asynchronously.
|
CompletionStage<Void> |
put(K k,
V v,
long ttl)
Like
put(K, V) but specifying a time to live for the entry. |
CompletionStage<V> |
putIfAbsent(K k,
V v)
Put the entry only if there is no entry with the key already present.
|
CompletionStage<V> |
putIfAbsent(K k,
V v,
long ttl)
Link
putIfAbsent(K, V) but specifying a time to live for the entry. |
CompletionStage<V> |
remove(K k)
Remove a value from the map, asynchronously.
|
CompletionStage<Boolean> |
removeIfPresent(K k,
V v)
Remove a value from the map, only if entry already exists with same value.
|
CompletionStage<V> |
replace(K k,
V v)
Replace the entry only if it is currently mapped to some value
|
CompletionStage<Boolean> |
replaceIfPresent(K k,
V oldValue,
V newValue)
Replace the entry only if it is currently mapped to a specific value
|
CompletionStage<Integer> |
size()
Provide the number of entries in the map
|
String |
toString() |
public io.vertx.core.shareddata.AsyncMap getDelegate()
public CompletionStage<V> get(K k)
k - the keypublic CompletionStage<Void> put(K k, V v)
k - the keyv - the valuepublic CompletionStage<Void> put(K k, V v, long ttl)
put(K, V) but specifying a time to live for the entry. Entry will expire and get evicted after the
ttl.k - the keyv - the valuettl - The time to live (in ms) for the entrypublic CompletionStage<V> putIfAbsent(K k, V v)
k - the keyv - the valuepublic CompletionStage<V> putIfAbsent(K k, V v, long ttl)
putIfAbsent(K, V) but specifying a time to live for the entry. Entry will expire and get evicted
after the ttl.k - the keyv - the valuettl - The time to live (in ms) for the entrypublic CompletionStage<V> remove(K k)
k - the keypublic CompletionStage<Boolean> removeIfPresent(K k, V v)
k - the keyv - the valuepublic CompletionStage<V> replace(K k, V v)
k - the keyv - the new valuepublic CompletionStage<Boolean> replaceIfPresent(K k, V oldValue, V newValue)
k - the keyoldValue - the existing valuenewValue - the new valuepublic CompletionStage<Void> clear()
public CompletionStage<Integer> size()
public static <K,V> AsyncMap<K,V> newInstance(io.vertx.core.shareddata.AsyncMap arg)
Copyright © 2019 SmallRye. All rights reserved.