public class AsyncMap<K,V> extends Object
Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<AsyncMap> |
__TYPE_ARG |
io.vertx.lang.rx.TypeArg<K> |
__typeArg_0 |
io.vertx.lang.rx.TypeArg<V> |
__typeArg_1 |
Constructor and Description |
---|
AsyncMap(AsyncMap delegate) |
AsyncMap(Object delegate,
io.vertx.lang.rx.TypeArg<K> typeArg_0,
io.vertx.lang.rx.TypeArg<V> typeArg_1) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear all entries in the map
|
void |
clear(Handler<AsyncResult<Void>> resultHandler)
Clear all entries in the map
|
boolean |
equals(Object o) |
void |
get(K k)
Get a value from the map, asynchronously.
|
void |
get(K k,
Handler<AsyncResult<V>> resultHandler)
Get a value from the map, asynchronously.
|
AsyncMap |
getDelegate() |
int |
hashCode() |
void |
keys()
Get the keys of the map, asynchronously.
|
void |
keys(Handler<AsyncResult<Set<K>>> resultHandler)
Get the keys of the map, asynchronously.
|
static <K,V> AsyncMap<K,V> |
newInstance(AsyncMap arg) |
static <K,V> AsyncMap<K,V> |
newInstance(AsyncMap arg,
io.vertx.lang.rx.TypeArg<K> __typeArg_K,
io.vertx.lang.rx.TypeArg<V> __typeArg_V) |
void |
put(K k,
V v)
Put a value in the map, asynchronously.
|
void |
put(K k,
V v,
Handler<AsyncResult<Void>> completionHandler)
Put a value in the map, asynchronously.
|
void |
put(K k,
V v,
long ttl)
Like
put(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>) but specifying a time to live for the entry. |
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. |
void |
putIfAbsent(K k,
V v)
Put the entry only if there is no entry with the key already present.
|
void |
putIfAbsent(K k,
V v,
Handler<AsyncResult<V>> completionHandler)
Put the entry only if there is no entry with the key already present.
|
void |
putIfAbsent(K k,
V v,
long ttl)
Link
putIfAbsent(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<V>>) but specifying a time to live for the entry. |
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. |
void |
remove(K k)
Remove a value from the map, asynchronously.
|
void |
remove(K k,
Handler<AsyncResult<V>> resultHandler)
Remove a value from the map, asynchronously.
|
void |
removeIfPresent(K k,
V v)
Remove a value from the map, only if entry already exists with same value.
|
void |
removeIfPresent(K k,
V v,
Handler<AsyncResult<Boolean>> resultHandler)
Remove a value from the map, only if entry already exists with same value.
|
void |
replace(K k,
V v)
Replace the entry only if it is currently mapped to some value
|
void |
replace(K k,
V v,
Handler<AsyncResult<V>> resultHandler)
Replace the entry only if it is currently mapped to some value
|
void |
replace(K k,
V v,
long ttl)
Replace the entry only if it is currently mapped to some value
|
void |
replace(K k,
V v,
long ttl,
Handler<AsyncResult<V>> resultHandler)
Replace the entry only if it is currently mapped to some value
|
void |
replaceIfPresent(K k,
V oldValue,
V newValue)
Replace the entry only if it is currently mapped to a specific value
|
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
|
void |
replaceIfPresent(K k,
V oldValue,
V newValue,
long ttl)
Replace the entry only if it is currently mapped to a specific value
|
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
|
Completable |
rxClear()
Clear all entries in the map
|
Maybe<V> |
rxGet(K k)
Get a value from the map, asynchronously.
|
Single<Set<K>> |
rxKeys()
Get the keys of the map, asynchronously.
|
Completable |
rxPut(K k,
V v)
Put a value in the map, asynchronously.
|
Completable |
rxPut(K k,
V v,
long ttl)
Like
put(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>) but specifying a time to live for the entry. |
Maybe<V> |
rxPutIfAbsent(K k,
V v)
Put the entry only if there is no entry with the key already present.
|
Maybe<V> |
rxPutIfAbsent(K k,
V v,
long ttl)
Link
putIfAbsent(K, V, io.vertx.core.Handler<io.vertx.core.AsyncResult<V>>) but specifying a time to live for the entry. |
Maybe<V> |
rxRemove(K k)
Remove a value from the map, asynchronously.
|
Single<Boolean> |
rxRemoveIfPresent(K k,
V v)
Remove a value from the map, only if entry already exists with same value.
|
Maybe<V> |
rxReplace(K k,
V v)
Replace the entry only if it is currently mapped to some value
|
Maybe<V> |
rxReplace(K k,
V v,
long ttl)
Replace the entry only if it is currently mapped to some value
|
Single<Boolean> |
rxReplaceIfPresent(K k,
V oldValue,
V newValue)
Replace the entry only if it is currently mapped to a specific value
|
Single<Boolean> |
rxReplaceIfPresent(K k,
V oldValue,
V newValue,
long ttl)
Replace the entry only if it is currently mapped to a specific value
|
Single<Integer> |
rxSize()
Provide the number of entries in the map
|
Single<List<V>> |
rxValues()
Get the values of the map, asynchronously.
|
void |
size()
Provide the number of entries in the map
|
void |
size(Handler<AsyncResult<Integer>> resultHandler)
Provide the number of entries in the map
|
String |
toString() |
void |
values()
Get the values of the map, asynchronously.
|
void |
values(Handler<AsyncResult<List<V>>> resultHandler)
Get the values of the map, asynchronously.
|
public static final io.vertx.lang.rx.TypeArg<AsyncMap> __TYPE_ARG
public final io.vertx.lang.rx.TypeArg<K> __typeArg_0
public final io.vertx.lang.rx.TypeArg<V> __typeArg_1
public AsyncMap(AsyncMap delegate)
public AsyncMap getDelegate()
public void get(K k, Handler<AsyncResult<V>> resultHandler)
k
- the keyresultHandler
- - this will be called some time later with the async result.public void get(K k)
k
- the keypublic Maybe<V> rxGet(K k)
k
- the keypublic 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 putpublic void put(K k, V v)
k
- the keyv
- the valuepublic Completable rxPut(K k, V v)
k
- the keyv
- the valuepublic 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 handlerpublic void put(K k, V v, long ttl)
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 entrypublic Completable rxPut(K k, V v, long ttl)
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 entrypublic void putIfAbsent(K k, V v, Handler<AsyncResult<V>> completionHandler)
k
- the keyv
- the valuecompletionHandler
- the handlerpublic void putIfAbsent(K k, V v)
k
- the keyv
- the valuepublic Maybe<V> rxPutIfAbsent(K k, V v)
k
- the keyv
- the valuepublic 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 handlerpublic void putIfAbsent(K k, V v, long ttl)
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 entrypublic Maybe<V> rxPutIfAbsent(K k, V v, long ttl)
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 entrypublic void remove(K k, Handler<AsyncResult<V>> resultHandler)
k
- the keyresultHandler
- - this will be called some time later to signify the value has been removedpublic void remove(K k)
k
- the keypublic Maybe<V> rxRemove(K k)
k
- the keypublic 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 removedpublic void removeIfPresent(K k, V v)
k
- the keyv
- the valuepublic Single<Boolean> rxRemoveIfPresent(K k, V v)
k
- the keyv
- the valuepublic void replace(K k, V v, Handler<AsyncResult<V>> resultHandler)
k
- the keyv
- the new valueresultHandler
- the result handler will be passed the previous valuepublic void replace(K k, V v)
k
- the keyv
- the new valuepublic Maybe<V> rxReplace(K k, V v)
k
- the keyv
- the new valuepublic void replace(K k, V v, long ttl, Handler<AsyncResult<V>> resultHandler)
k
- the keyv
- the new valuettl
- The time to live (in ms) for the entryresultHandler
- the result handler will be passed the previous valuepublic void replace(K k, V v, long ttl)
k
- the keyv
- the new valuettl
- The time to live (in ms) for the entrypublic Maybe<V> rxReplace(K k, V v, long ttl)
k
- the keyv
- the new valuettl
- The time to live (in ms) for the entrypublic void replaceIfPresent(K k, V oldValue, V newValue, Handler<AsyncResult<Boolean>> resultHandler)
k
- the keyoldValue
- the existing valuenewValue
- the new valueresultHandler
- the result handlerpublic void replaceIfPresent(K k, V oldValue, V newValue)
k
- the keyoldValue
- the existing valuenewValue
- the new valuepublic Single<Boolean> rxReplaceIfPresent(K k, V oldValue, V newValue)
k
- the keyoldValue
- the existing valuenewValue
- the new valuepublic void replaceIfPresent(K k, V oldValue, V newValue, long ttl, Handler<AsyncResult<Boolean>> resultHandler)
k
- the keyoldValue
- the existing valuenewValue
- the new valuettl
- The time to live (in ms) for the entryresultHandler
- the result handlerpublic void replaceIfPresent(K k, V oldValue, V newValue, long ttl)
k
- the keyoldValue
- the existing valuenewValue
- the new valuettl
- The time to live (in ms) for the entrypublic Single<Boolean> rxReplaceIfPresent(K k, V oldValue, V newValue, long ttl)
k
- the keyoldValue
- the existing valuenewValue
- the new valuettl
- The time to live (in ms) for the entrypublic void clear(Handler<AsyncResult<Void>> resultHandler)
resultHandler
- called on completionpublic void clear()
public Completable rxClear()
public void size(Handler<AsyncResult<Integer>> resultHandler)
resultHandler
- handler which will receive the number of entriespublic void size()
public 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 completespublic void keys()
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
.
public Single<Set<K>> rxKeys()
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
.
public 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 completespublic void values()
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
.
public Single<List<V>> rxValues()
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
.
Copyright © 2024 Eclipse. All rights reserved.