Modifier and Type | Method and Description |
---|---|
Future<Void> |
clear()
Same as
clear(Handler) but returns a Future of the asynchronous result |
default void |
clear(Handler<AsyncResult<Void>> resultHandler)
Clear all entries in the map
|
Future<Map<K,V>> |
entries()
Same as
entries(Handler) but returns a Future of the asynchronous result |
default void |
entries(Handler<AsyncResult<Map<K,V>>> resultHandler)
Get the entries of the map, asynchronously.
|
Future<V> |
get(K k)
Same as
#get(K, Handler) but returns a Future of the asynchronous result |
default void |
get(K k,
Handler<AsyncResult<V>> resultHandler)
Get a value from the map, asynchronously.
|
Future<Set<K>> |
keys()
Same as
keys(Handler) but returns a Future of the asynchronous result |
default void |
keys(Handler<AsyncResult<Set<K>>> resultHandler)
Get the keys of the map, asynchronously.
|
Future<Void> |
put(K k,
V v)
Same as
#put(K, V, Handler) but returns a Future of the asynchronous result |
default void |
put(K k,
V v,
Handler<AsyncResult<Void>> completionHandler)
Put a value in the map, asynchronously.
|
Future<Void> |
put(K k,
V v,
long ttl)
Same as
#put(K, V, long, Handler) but returns a Future of the asynchronous result |
default void |
put(K k,
V v,
long ttl,
Handler<AsyncResult<Void>> completionHandler)
Like
put(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>) but specifying a time to live for the entry. |
Future<V> |
putIfAbsent(K k,
V v)
Same as
#putIfAbsent(K, V, Handler) but returns a Future of the asynchronous result |
default void |
putIfAbsent(K k,
V v,
Handler<AsyncResult<V>> completionHandler)
Put the entry only if there is no entry with the key already present.
|
Future<V> |
putIfAbsent(K k,
V v,
long ttl)
Same as
#putIfAbsent(K, V, long, Handler) but returns a Future of the asynchronous result |
default void |
putIfAbsent(K k,
V v,
long ttl,
Handler<AsyncResult<V>> completionHandler)
Link
putIfAbsent(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<V>>) but specifying a time to live for the entry. |
Future<V> |
remove(K k)
Same as
#remove(K, Handler) but returns a Future of the asynchronous result |
default void |
remove(K k,
Handler<AsyncResult<V>> resultHandler)
Remove a value from the map, asynchronously.
|
Future<Boolean> |
removeIfPresent(K k,
V v)
Same as
#removeIfPresent(K, V, Handler) but returns a Future of the asynchronous result |
default void |
removeIfPresent(K k,
V v,
Handler<AsyncResult<Boolean>> resultHandler)
Remove a value from the map, only if entry already exists with same value.
|
Future<V> |
replace(K k,
V v)
Same as
#replace(K, V, Handler) but returns a Future of the asynchronous result |
default void |
replace(K k,
V v,
Handler<AsyncResult<V>> resultHandler)
Replace the entry only if it is currently mapped to some value
|
Future<Boolean> |
replaceIfPresent(K k,
V oldValue,
V newValue)
Same as
#replaceIfPresent(K, V, V, Handler) but returns a Future of the asynchronous result |
default void |
replaceIfPresent(K k,
V oldValue,
V newValue,
Handler<AsyncResult<Boolean>> resultHandler)
Replace the entry only if it is currently mapped to a specific value
|
Future<Integer> |
size()
Same as
size(Handler) but returns a Future of the asynchronous result |
default void |
size(Handler<AsyncResult<Integer>> resultHandler)
Provide the number of entries in the map
|
Future<List<V>> |
values()
Same as
values(Handler) but returns a Future of the asynchronous result |
default void |
values(Handler<AsyncResult<List<V>>> resultHandler)
Get the values of the map, asynchronously.
|
default void get(K k, Handler<AsyncResult<V>> resultHandler)
k
- the keyresultHandler
- - this will be called some time later with the async result.default void put(K k, V v, Handler<AsyncResult<Void>> completionHandler)
k
- the keyv
- the valuecompletionHandler
- - this will be called some time later to signify the value has been putFuture<Void> put(K k, V v)
#put(K, V, Handler)
but returns a Future
of the asynchronous resultdefault void put(K k, V v, long ttl, Handler<AsyncResult<Void>> completionHandler)
put(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
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 entrycompletionHandler
- the handlerFuture<Void> put(K k, V v, long ttl)
#put(K, V, long, Handler)
but returns a Future
of the asynchronous resultdefault void putIfAbsent(K k, V v, Handler<AsyncResult<V>> completionHandler)
k
- the keyv
- the valuecompletionHandler
- the handlerFuture<V> putIfAbsent(K k, V v)
#putIfAbsent(K, V, Handler)
but returns a Future
of the asynchronous resultdefault void putIfAbsent(K k, V v, long ttl, Handler<AsyncResult<V>> completionHandler)
putIfAbsent(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<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 entrycompletionHandler
- the handlerFuture<V> putIfAbsent(K k, V v, long ttl)
#putIfAbsent(K, V, long, Handler)
but returns a Future
of the asynchronous resultdefault void remove(K k, Handler<AsyncResult<V>> resultHandler)
k
- the keyresultHandler
- - this will be called some time later to signify the value has been removedFuture<V> remove(K k)
#remove(K, Handler)
but returns a Future
of the asynchronous resultdefault void removeIfPresent(K k, V v, Handler<AsyncResult<Boolean>> resultHandler)
k
- the keyv
- the valueresultHandler
- - this will be called some time later to signify the value has been removedFuture<Boolean> removeIfPresent(K k, V v)
#removeIfPresent(K, V, Handler)
but returns a Future
of the asynchronous resultdefault void replace(K k, V v, Handler<AsyncResult<V>> resultHandler)
k
- the keyv
- the new valueresultHandler
- the result handler will be passed the previous valueFuture<V> replace(K k, V v)
#replace(K, V, Handler)
but returns a Future
of the asynchronous resultdefault void replaceIfPresent(K k, V oldValue, V newValue, Handler<AsyncResult<Boolean>> resultHandler)
k
- the keyoldValue
- the existing valuenewValue
- the new valueresultHandler
- the result handlerFuture<Boolean> replaceIfPresent(K k, V oldValue, V newValue)
#replaceIfPresent(K, V, V, Handler)
but returns a Future
of the asynchronous resultdefault void clear(Handler<AsyncResult<Void>> resultHandler)
resultHandler
- called on completionFuture<Void> clear()
clear(Handler)
but returns a Future
of the asynchronous resultdefault void size(Handler<AsyncResult<Integer>> resultHandler)
resultHandler
- handler which will receive the number of entriesFuture<Integer> size()
size(Handler)
but returns a Future
of the asynchronous resultdefault void keys(Handler<AsyncResult<Set<K>>> resultHandler)
Use this method with care as the map may contain a large number of keys,
which may not fit entirely in memory of a single node.
In this case, the invocation will result in an OutOfMemoryError
.
resultHandler
- invoked when the operation completesFuture<Set<K>> keys()
keys(Handler)
but returns a Future
of the asynchronous resultdefault void values(Handler<AsyncResult<List<V>>> resultHandler)
Use this method with care as the map may contain a large number of values,
which may not fit entirely in memory of a single node.
In this case, the invocation will result in an OutOfMemoryError
.
resultHandler
- invoked when the operation completesFuture<List<V>> values()
values(Handler)
but returns a Future
of the asynchronous resultdefault void entries(Handler<AsyncResult<Map<K,V>>> resultHandler)
Use this method with care as the map may contain a large number of entries,
which may not fit entirely in memory of a single node.
In this case, the invocation will result in an OutOfMemoryError
.
resultHandler
- invoked when the operation completesFuture<Map<K,V>> entries()
entries(Handler)
but returns a Future
of the asynchronous resultCopyright © 2021 Eclipse. All rights reserved.