K
- keyV
- valuepublic interface RMapAsync<K,V> extends RExpirableAsync
Modifier and Type | Method and Description |
---|---|
RFuture<V> |
addAndGetAsync(K key,
Number value) |
RFuture<Boolean> |
containsKeyAsync(Object key) |
RFuture<Boolean> |
containsValueAsync(Object value) |
RFuture<Boolean> |
fastPutAsync(K key,
V value)
Associates the specified
value with the specified key
in async manner. |
RFuture<Boolean> |
fastPutIfAbsentAsync(K key,
V value)
Associates the specified
value with the specified key
only if there is no any association with specifiedkey . |
RFuture<Long> |
fastRemoveAsync(K... keys)
Removes
keys from map by one operation in async manner. |
RFuture<Map<K,V>> |
getAllAsync(Set<K> keys)
Gets a map slice contained the mappings with defined
keys
by one operation. |
RFuture<V> |
getAsync(K key)
Returns the value to which the specified key is mapped,
or
null if this map contains no mapping for the key. |
RFuture<Void> |
loadAllAsync(boolean replaceExistingValues,
int parallelism)
Loads all map entries to this Redis map using
MapLoader . |
RFuture<Void> |
loadAllAsync(Set<? extends K> keys,
boolean replaceExistingValues,
int parallelism)
Loads map entries using
MapLoader whose keys are listed in defined keys parameter. |
RFuture<Void> |
putAllAsync(Map<? extends K,? extends V> map)
Associates the specified
value with the specified key
in batch. |
RFuture<V> |
putAsync(K key,
V value)
Associates the specified
value with the specified key
in async manner. |
RFuture<V> |
putIfAbsentAsync(K key,
V value)
Associates the specified
value with the specified key
only if there is no any association with specifiedkey . |
RFuture<Set<Map.Entry<K,V>>> |
readAllEntrySetAsync()
Read all map entries at once
|
RFuture<Set<K>> |
readAllKeySetAsync()
Read all keys at once
|
RFuture<Map<K,V>> |
readAllMapAsync()
Read all map as local instance at once
|
RFuture<Collection<V>> |
readAllValuesAsync()
Read all values at once
|
RFuture<V> |
removeAsync(K key)
Removes
key from map and returns associated value in async manner. |
RFuture<Boolean> |
removeAsync(Object key,
Object value)
Removes
key from map only if it associated with value . |
RFuture<V> |
replaceAsync(K key,
V value)
Replaces previous value with a new
value associated with the key . |
RFuture<Boolean> |
replaceAsync(K key,
V oldValue,
V newValue)
Replaces previous
oldValue with a newValue associated with the key . |
RFuture<Integer> |
sizeAsync() |
RFuture<Integer> |
valueSizeAsync(K key)
Returns size of value mapped by key in bytes
|
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
copyAsync, deleteAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, touchAsync, unlinkAsync
RFuture<Void> loadAllAsync(boolean replaceExistingValues, int parallelism)
MapLoader
.replaceExistingValues
- - true
if existed values should be replaced, false
otherwise.parallelism
- - parallelism level, used to increase speed of process executionRFuture<Void> loadAllAsync(Set<? extends K> keys, boolean replaceExistingValues, int parallelism)
MapLoader
whose keys are listed in defined keys
parameter.keys
- - map keysreplaceExistingValues
- - true
if existed values should be replaced, false
otherwise.parallelism
- - parallelism level, used to increase speed of process executionRFuture<Integer> valueSizeAsync(K key)
key
- - map keyRFuture<Map<K,V>> getAllAsync(Set<K> keys)
keys
by one operation.
If map doesn't contain value/values for specified key/keys and MapLoader
is defined
then value/values will be loaded in read-through mode.
The returned map is NOT backed by the original map.
keys
- - map keysRFuture<Void> putAllAsync(Map<? extends K,? extends V> map)
value
with the specified key
in batch.
If MapWriter
is defined then new map entries are stored in write-through mode.
map
- mappings to be stored in this mapRFuture<Long> fastRemoveAsync(K... keys)
keys
from map by one operation in async manner.
Works faster than
but doesn't return
the value associated with removeAsync(Object, Object)
key
.
If MapWriter
is defined then keys
are deleted in write-through mode.
keys
- - map keysRFuture<Boolean> fastPutAsync(K key, V value)
value
with the specified key
in async manner.
Works faster than
but not returning
the previous value associated with putAsync(Object, Object)
key
If MapWriter
is defined then new map entry is stored in write-through mode.
key
- - map keyvalue
- - map valuetrue
if key is a new one in the hash and value was set.
false
if key already exists in the hash and the value was updated.RFuture<Boolean> fastPutIfAbsentAsync(K key, V value)
value
with the specified key
only if there is no any association with specifiedkey
.
Works faster than
but not returning
the previous value associated with putIfAbsentAsync(Object, Object)
key
If MapWriter
is defined then new map entry is stored in write-through mode.
key
- - map keyvalue
- - map valuetrue
if key is a new one in the hash and value was set.
false
if key already exists in the hash and change hasn't been made.RFuture<Collection<V>> readAllValuesAsync()
RFuture<Set<Map.Entry<K,V>>> readAllEntrySetAsync()
RFuture<Map<K,V>> readAllMapAsync()
RFuture<V> getAsync(K key)
null
if this map contains no mapping for the key.
If map doesn't contain value for specified key and MapLoader
is defined
then value will be loaded in read-through mode.
key
- the key whose associated value is to be returnednull
if this map contains no mapping for the keyRFuture<V> putAsync(K key, V value)
value
with the specified key
in async manner.
If MapWriter
is defined then new map entry is stored in write-through mode.
key
- - map keyvalue
- - map valueRFuture<V> removeAsync(K key)
key
from map and returns associated value in async manner.
If MapWriter
is defined then key
is deleted in write-through mode.
key
- - map keynull
if there wasn't any associationRFuture<V> replaceAsync(K key, V value)
value
associated with the key
.
If there wasn't any association before then method returns null
.
If MapWriter
is defined then new value
is written in write-through mode.
key
- - map keyvalue
- - map valuenull
if there wasn't any association and change hasn't been madeRFuture<Boolean> replaceAsync(K key, V oldValue, V newValue)
oldValue
with a newValue
associated with the key
.
If previous value doesn't exist or equal to oldValue
then method returns false
.
If MapWriter
is defined then newValue
is written in write-through mode.
key
- - map keyoldValue
- - map old valuenewValue
- - map new valuetrue
if value has been replaced otherwise false
.RFuture<Boolean> removeAsync(Object key, Object value)
key
from map only if it associated with value
.
If MapWriter
is defined then key
is deleted in write-through mode.
key
- - map keyvalue
- - map valuetrue
if map entry has been replaced otherwise false
.RFuture<V> putIfAbsentAsync(K key, V value)
value
with the specified key
only if there is no any association with specifiedkey
.
If MapWriter
is defined then new map entry is stored in write-through mode.
key
- - map keyvalue
- - map valuenull
if key is a new one in the hash and value was set.
Previous value if key already exists in the hash and change hasn't been made.Copyright © 2014–2018 The Redisson Project. All rights reserved.