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 |
---|---|
Completable |
clear()
Clear all entries in the map
|
boolean |
equals(Object o) |
Maybe<V> |
get(K k)
Get a value from the map, asynchronously.
|
AsyncMap |
getDelegate() |
int |
hashCode() |
Single<Set<K>> |
keys()
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) |
Completable |
put(K k,
V v)
Put a value in the map, asynchronously.
|
Completable |
put(K k,
V v,
long ttl)
Like
put(K, V) but specifying a time to live for the entry. |
Maybe<V> |
putIfAbsent(K k,
V v)
Put the entry only if there is no entry with the key already present.
|
Maybe<V> |
putIfAbsent(K k,
V v,
long ttl)
Link
putIfAbsent(K, V) but specifying a time to live for the entry. |
Maybe<V> |
remove(K k)
Remove a value from the map, asynchronously.
|
Single<Boolean> |
removeIfPresent(K k,
V v)
Remove a value from the map, only if entry already exists with same value.
|
Maybe<V> |
replace(K k,
V v)
Replace the entry only if it is currently mapped to some value
|
Maybe<V> |
replace(K k,
V v,
long ttl)
Replace the entry only if it is currently mapped to some value
|
Single<Boolean> |
replaceIfPresent(K k,
V oldValue,
V newValue)
Replace the entry only if it is currently mapped to a specific value
|
Single<Boolean> |
replaceIfPresent(K k,
V oldValue,
V newValue,
long ttl)
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) 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) 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.
|
Single<Integer> |
size()
Provide the number of entries in the map
|
String |
toString() |
Single<List<V>> |
values()
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 Maybe<V> get(K k)
k
- the keypublic Maybe<V> rxGet(K k)
k
- the keypublic Completable put(K k, V v)
k
- the keyv
- the valuepublic Completable rxPut(K k, V v)
k
- the keyv
- the valuepublic Completable 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 Completable rxPut(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 Maybe<V> putIfAbsent(K k, V v)
k
- the keyv
- the valuepublic Maybe<V> rxPutIfAbsent(K k, V v)
k
- the keyv
- the valuepublic Maybe<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 Maybe<V> rxPutIfAbsent(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 Maybe<V> remove(K k)
k
- the keypublic Maybe<V> rxRemove(K k)
k
- the keypublic Single<Boolean> removeIfPresent(K k, V v)
k
- the keyv
- the valuepublic Single<Boolean> rxRemoveIfPresent(K k, V v)
k
- the keyv
- the valuepublic Maybe<V> replace(K k, V v)
k
- the keyv
- the new valuepublic Maybe<V> rxReplace(K k, V v)
k
- the keyv
- the new valuepublic Maybe<V> 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 Single<Boolean> 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 Single<Boolean> 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 Completable clear()
public Completable rxClear()
public Single<Set<K>> 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 Single<List<V>> 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.