Class AsyncMap<K,V>
- All Implemented Interfaces:
RxDelegate
-
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Completableclear()Clear all entries in the mapbooleanio.reactivex.rxjava3.core.Maybe<V>Get a value from the map, asynchronously.inthashCode()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, TypeArg<K> __typeArg_K, TypeArg<V> __typeArg_V) io.reactivex.rxjava3.core.CompletablePut a value in the map, asynchronously.io.reactivex.rxjava3.core.CompletableLikeput(K, V)but specifying a time to live for the entry.io.reactivex.rxjava3.core.Maybe<V>putIfAbsent(K k, V v) Put the entry only if there is no entry with the key already present.io.reactivex.rxjava3.core.Maybe<V>putIfAbsent(K k, V v, long ttl) LinkputIfAbsent(K, V)but specifying a time to live for the entry.io.reactivex.rxjava3.core.Maybe<V>Remove a value from the map, asynchronously.io.reactivex.rxjava3.core.Single<Boolean>removeIfPresent(K k, V v) Remove a value from the map, only if entry already exists with same value.io.reactivex.rxjava3.core.Maybe<V>Replace the entry only if it is currently mapped to some valueio.reactivex.rxjava3.core.Maybe<V>Replace the entry only if it is currently mapped to some valueio.reactivex.rxjava3.core.Single<Boolean>replaceIfPresent(K k, V oldValue, V newValue) Replace the entry only if it is currently mapped to a specific valueio.reactivex.rxjava3.core.Single<Boolean>replaceIfPresent(K k, V oldValue, V newValue, long ttl) Replace the entry only if it is currently mapped to a specific valueio.reactivex.rxjava3.core.CompletablerxClear()Clear all entries in the mapio.reactivex.rxjava3.core.Maybe<V>Get a value from the map, asynchronously.rxKeys()Get the keys of the map, asynchronously.io.reactivex.rxjava3.core.CompletablePut a value in the map, asynchronously.io.reactivex.rxjava3.core.CompletableLikeput(K, V)but specifying a time to live for the entry.io.reactivex.rxjava3.core.Maybe<V>rxPutIfAbsent(K k, V v) Put the entry only if there is no entry with the key already present.io.reactivex.rxjava3.core.Maybe<V>rxPutIfAbsent(K k, V v, long ttl) LinkputIfAbsent(K, V)but specifying a time to live for the entry.io.reactivex.rxjava3.core.Maybe<V>Remove a value from the map, asynchronously.io.reactivex.rxjava3.core.Single<Boolean>rxRemoveIfPresent(K k, V v) Remove a value from the map, only if entry already exists with same value.io.reactivex.rxjava3.core.Maybe<V>Replace the entry only if it is currently mapped to some valueio.reactivex.rxjava3.core.Maybe<V>Replace the entry only if it is currently mapped to some valueio.reactivex.rxjava3.core.Single<Boolean>rxReplaceIfPresent(K k, V oldValue, V newValue) Replace the entry only if it is currently mapped to a specific valueio.reactivex.rxjava3.core.Single<Boolean>rxReplaceIfPresent(K k, V oldValue, V newValue, long ttl) Replace the entry only if it is currently mapped to a specific valueio.reactivex.rxjava3.core.Single<Integer>rxSize()Provide the number of entries in the maprxValues()Get the values of the map, asynchronously.io.reactivex.rxjava3.core.Single<Integer>size()Provide the number of entries in the maptoString()values()Get the values of the map, asynchronously.
-
Field Details
-
__TYPE_ARG
-
__typeArg_0
-
__typeArg_1
-
-
Constructor Details
-
AsyncMap
-
Method Details
-
toString
-
equals
-
hashCode
public int hashCode() -
getDelegate
- Specified by:
getDelegatein interfaceRxDelegate
-
get
Get a value from the map, asynchronously.- Parameters:
k- the key- Returns:
- a future notified some time later with the async result.
-
rxGet
Get a value from the map, asynchronously.- Parameters:
k- the key- Returns:
- a future notified some time later with the async result.
-
put
Put a value in the map, asynchronously.- Parameters:
k- the keyv- the value- Returns:
- a future notified some time later with the async result.
-
rxPut
Put a value in the map, asynchronously.- Parameters:
k- the keyv- the value- Returns:
- a future notified some time later with the async result.
-
put
Likeput(K, V)but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.- Parameters:
k- the keyv- the valuettl- The time to live (in ms) for the entry- Returns:
- a future notified some time later with the async result.
-
rxPut
Likeput(K, V)but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.- Parameters:
k- the keyv- the valuettl- The time to live (in ms) for the entry- Returns:
- a future notified some time later with the async result.
-
putIfAbsent
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.- Parameters:
k- the keyv- the value- Returns:
- a future notified some time later with the async result.
-
rxPutIfAbsent
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.- Parameters:
k- the keyv- the value- Returns:
- a future notified some time later with the async result.
-
putIfAbsent
LinkputIfAbsent(K, V)but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.- Parameters:
k- the keyv- the valuettl- The time to live (in ms) for the entry- Returns:
- a future notified some time later with the async result.
-
rxPutIfAbsent
LinkputIfAbsent(K, V)but specifying a time to live for the entry. Entry will expire and get evicted after the ttl.- Parameters:
k- the keyv- the valuettl- The time to live (in ms) for the entry- Returns:
- a future notified some time later with the async result.
-
remove
Remove a value from the map, asynchronously.- Parameters:
k- the key- Returns:
- a future notified some time later with the async result.
-
rxRemove
Remove a value from the map, asynchronously.- Parameters:
k- the key- Returns:
- a future notified some time later with the async result.
-
removeIfPresent
Remove a value from the map, only if entry already exists with same value.- Parameters:
k- the keyv- the value- Returns:
- a future notified some time later with the async result.
-
rxRemoveIfPresent
Remove a value from the map, only if entry already exists with same value.- Parameters:
k- the keyv- the value- Returns:
- a future notified some time later with the async result.
-
replace
Replace the entry only if it is currently mapped to some value- Parameters:
k- the keyv- the new value- Returns:
- a future notified some time later with the async result.
-
rxReplace
Replace the entry only if it is currently mapped to some value- Parameters:
k- the keyv- the new value- Returns:
- a future notified some time later with the async result.
-
replace
Replace the entry only if it is currently mapped to some value- Parameters:
k- the keyv- the new valuettl- The time to live (in ms) for the entry- Returns:
- a future notified some time later with the previous value
-
rxReplace
Replace the entry only if it is currently mapped to some value- Parameters:
k- the keyv- the new valuettl- The time to live (in ms) for the entry- Returns:
- a future notified some time later with the previous value
-
replaceIfPresent
Replace the entry only if it is currently mapped to a specific value- Parameters:
k- the keyoldValue- the existing valuenewValue- the new value- Returns:
- a future notified some time later with the async result.
-
rxReplaceIfPresent
Replace the entry only if it is currently mapped to a specific value- Parameters:
k- the keyoldValue- the existing valuenewValue- the new value- Returns:
- a future notified some time later with the async result.
-
replaceIfPresent
public io.reactivex.rxjava3.core.Single<Boolean> replaceIfPresent(K k, V oldValue, V newValue, long ttl) Replace the entry only if it is currently mapped to a specific value- Parameters:
k- the keyoldValue- the existing valuenewValue- the new valuettl- The time to live (in ms) for the entry- Returns:
- a future notified some time later with the async result.
-
rxReplaceIfPresent
public io.reactivex.rxjava3.core.Single<Boolean> rxReplaceIfPresent(K k, V oldValue, V newValue, long ttl) Replace the entry only if it is currently mapped to a specific value- Parameters:
k- the keyoldValue- the existing valuenewValue- the new valuettl- The time to live (in ms) for the entry- Returns:
- a future notified some time later with the async result.
-
clear
public io.reactivex.rxjava3.core.Completable clear()Clear all entries in the map- Returns:
- a future notified some time later with the async result.
-
rxClear
public io.reactivex.rxjava3.core.Completable rxClear()Clear all entries in the map- Returns:
- a future notified some time later with the async result.
-
size
Provide the number of entries in the map- Returns:
- a future notified some time later with the async result.
-
rxSize
Provide the number of entries in the map- Returns:
- a future notified some time later with the async result.
-
keys
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
OutOfMemoryError.- Returns:
- a future notified some time later with the async result.
-
rxKeys
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
OutOfMemoryError.- Returns:
- a future notified some time later with the async result.
-
values
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
OutOfMemoryError.- Returns:
- a future notified some time later with the async result.
-
rxValues
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
OutOfMemoryError.- Returns:
- a future notified some time later with the async result.
-