AsyncMap does not allow null to be used as a key or value.
Implementation Specification
Implementations of the interface must handle io. implementing objects.
| Modifier and Type | Method and Description |
|---|---|
| public default void | |
| public Future | |
| public default void | entries(Handler<AsyncResult<Map<K, V>>>
invoked when the operation completes resultHandler)Get the entries of the map, asynchronously. |
| public Future | |
| public default void | get(K
the key k, Handler<AsyncResult<@Nullable V>> - this will be called some time later with the async result. resultHandler)Get a value from the map, asynchronously. |
| public Future | |
| public default void | keys(Handler<AsyncResult<Set<K>>>
invoked when the operation completes resultHandler)Get the keys of the map, asynchronously. |
| public Future | |
| public default void | put(K
the key k, V the value v, Handler<AsyncResult<Void>> - this will be called some time later to signify the value has been put completionHandler)Put a value in the map, asynchronously. |
| public Future | |
| public default void | put(K
the key k, V the value v, long The time to live (in ms) for the entry ttl, Handler<AsyncResult<Void>> the handler completionHandler)Like |
| public Future | put(K k, V v, long ttl)
Same as |
| public default void | putIfAbsent(K
the key k, V the value v, Handler<AsyncResult<@Nullable V>> the handler completionHandler)Put the entry only if there is no entry with the key already present. |
| public Future | putIfAbsent(K k, V v)
Same as |
| public default void | putIfAbsent(K
the key k, V the value v, long The time to live (in ms) for the entry ttl, Handler<AsyncResult<@Nullable V>> the handler completionHandler)Link |
| public Future | putIfAbsent(K k, V v, long ttl)
Same as |
| public default void | remove(K
the key k, Handler<AsyncResult<@Nullable V>> - this will be called some time later to signify the value has been removed resultHandler)Remove a value from the map, asynchronously. |
| public Future | |
| public default void | removeIfPresent(K
the key k, V the value v, Handler<AsyncResult<Boolean>> - this will be called some time later to signify the value has been removed resultHandler)Remove a value from the map, only if entry already exists with same value. |
| public Future | removeIfPresent(K k, V v)
Same as |
| public default void | replace(K
the key k, V the new value v, Handler<AsyncResult<@Nullable V>> the result handler will be passed the previous value resultHandler)Replace the entry only if it is currently mapped to some value |
| public Future | |
| public default void | replace(K
the key k, V the new value v, long The time to live (in ms) for the entry ttl, Handler<AsyncResult<@Nullable V>> the result handler will be passed the previous value resultHandler)Replace the entry only if it is currently mapped to some value |
| public default Future | replace(K k, V v, long ttl)
Same as |
| public default void | replaceIfPresent(K
the key k, V the existing value oldValue, V the new value newValue, Handler<AsyncResult<Boolean>> the result handler resultHandler)Replace the entry only if it is currently mapped to a specific value |
| public Future | replaceIfPresent(K k, V oldValue, V newValue)
Same as |
| public default void | replaceIfPresent(K
the key k, V the existing value oldValue, V the new value newValue, long The time to live (in ms) for the entry ttl, Handler<AsyncResult<Boolean>> the result handler resultHandler)Replace the entry only if it is currently mapped to a specific value |
| public default Future | replaceIfPresent(K k, V oldValue, V newValue, long ttl)
Same as |
| public default void | size(Handler<AsyncResult<Integer>>
handler which will receive the number of entries resultHandler)Provide the number of entries in the map |
| public Future | |
| public default void | values(Handler<AsyncResult<List<V>>>
invoked when the operation completes resultHandler)Get the values of the map, asynchronously. |
| public Future |
| clear | back to summary |
|---|---|
| public default void clear(Handler<AsyncResult<Void>> resultHandler) Clear all entries in the map
| |
| clear | back to summary |
|---|---|
| public Future Same as | |
| entries | back to summary |
|---|---|
| public default void entries(Handler<AsyncResult<Map<K, V>>> resultHandler) Get the entries of the map, asynchronously.
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
| |
| entries | back to summary |
|---|---|
| public Future Same as
| |
| get | back to summary |
|---|---|
| public default void get(K k, Handler<AsyncResult<@Nullable V>> resultHandler) Get a value from the map, asynchronously.
| |
| get | back to summary |
|---|---|
| public Future Same as | |
| keys | back to summary |
|---|---|
| public default void keys(Handler<AsyncResult<Set<K>>> resultHandler) Get the keys of the map, asynchronously.
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
| |
| keys | back to summary |
|---|---|
| public Future Same as
| |
| put | back to summary |
|---|---|
| public default void put(K k, V v, Handler<AsyncResult<Void>> completionHandler) Put a value in the map, asynchronously.
| |
| put | back to summary |
|---|---|
| public Future Same as | |
| put | back to summary |
|---|---|
| public default void put(K k, V v, long ttl, Handler<AsyncResult<Void>> completionHandler) Like
| |
| put | back to summary |
|---|---|
| public Future Same as | |
| putIfAbsent | back to summary |
|---|---|
| public default void putIfAbsent(K k, V v, Handler<AsyncResult<@Nullable V>> completionHandler) Put the entry only if there is no entry with the key already present. If key already present then the existing value will be returned to the handler, otherwise null.
| |
| putIfAbsent | back to summary |
|---|---|
| public Future Same as | |
| putIfAbsent | back to summary |
|---|---|
| public default void putIfAbsent(K k, V v, long ttl, Handler<AsyncResult<@Nullable V>> completionHandler) Link
| |
| putIfAbsent | back to summary |
|---|---|
| public Future Same as | |
| remove | back to summary |
|---|---|
| public default void remove(K k, Handler<AsyncResult<@Nullable V>> resultHandler) Remove a value from the map, asynchronously.
| |
| remove | back to summary |
|---|---|
| public Future Same as | |
| removeIfPresent | back to summary |
|---|---|
| public 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.
| |
| removeIfPresent | back to summary |
|---|---|
| public Future Same as | |
| replace | back to summary |
|---|---|
| public default void replace(K k, V v, Handler<AsyncResult<@Nullable V>> resultHandler) Replace the entry only if it is currently mapped to some value
| |
| replace | back to summary |
|---|---|
| public Future Same as | |
| replace | back to summary |
|---|---|
| public default void replace(K k, V v, long ttl, Handler<AsyncResult<@Nullable V>> resultHandler) Replace the entry only if it is currently mapped to some value
| |
| replace | back to summary |
|---|---|
| public default Future Same as | |
| replaceIfPresent | back to summary |
|---|---|
| public 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
| |
| replaceIfPresent | back to summary |
|---|---|
| public Future Same as | |
| replaceIfPresent | back to summary |
|---|---|
| public default void replaceIfPresent(K k, V oldValue, V newValue, long ttl, Handler<AsyncResult<Boolean>> resultHandler) Replace the entry only if it is currently mapped to a specific value
| |
| replaceIfPresent | back to summary |
|---|---|
| public default Future Same as | |
| size | back to summary |
|---|---|
| public default void size(Handler<AsyncResult<Integer>> resultHandler) Provide the number of entries in the map
| |
| size | back to summary |
|---|---|
| public Future Same as | |
| values | back to summary |
|---|---|
| public default void values(Handler<AsyncResult<List<V>>> resultHandler) Get the values of the map, asynchronously.
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
| |
| values | back to summary |
|---|---|
| public Future Same as
| |