K
- keyV
- valuepublic interface RMapReactive<K,V> extends RExpirableReactive
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<V> |
addAndGet(K key,
Number value) |
reactor.core.publisher.Mono<Boolean> |
containsKey(Object key) |
reactor.core.publisher.Mono<Boolean> |
containsValue(Object value) |
reactor.core.publisher.Flux<Map.Entry<K,V>> |
entryIterator()
Returns iterator over map entries collection.
|
reactor.core.publisher.Flux<Map.Entry<K,V>> |
entryIterator(int count)
Returns iterator over map entries collection.
|
reactor.core.publisher.Flux<Map.Entry<K,V>> |
entryIterator(String pattern)
Returns iterator over map entries collection.
|
reactor.core.publisher.Flux<Map.Entry<K,V>> |
entryIterator(String pattern,
int count)
Returns iterator over map entries collection.
|
reactor.core.publisher.Mono<Boolean> |
fastPut(K key,
V value)
Associates the specified
value with the specified key
in async manner. |
reactor.core.publisher.Mono<Boolean> |
fastPutIfAbsent(K key,
V value)
Associates the specified
value with the specified key
only if there is no any association with specifiedkey . |
reactor.core.publisher.Mono<Long> |
fastRemove(K... keys)
Removes
keys from map by one operation in async manner. |
reactor.core.publisher.Mono<V> |
get(K key)
Returns the value to which the specified key is mapped,
or
null if this map contains no mapping for the key. |
reactor.core.publisher.Mono<Map<K,V>> |
getAll(Set<K> keys)
Gets a map slice contained the mappings with defined
keys
by one operation. |
RLockReactive |
getFairLock(K key)
Returns
RLock instance associated with key |
RLockReactive |
getLock(K key)
Returns
RLock instance associated with key |
RPermitExpirableSemaphoreReactive |
getPermitExpirableSemaphore(K key)
Returns
RPermitExpirableSemaphore instance associated with key |
RReadWriteLockReactive |
getReadWriteLock(K key)
Returns
RReadWriteLock instance associated with key |
RSemaphoreReactive |
getSemaphore(K key)
Returns
RSemaphore instance associated with key |
reactor.core.publisher.Flux<K> |
keyIterator()
Returns iterator over key set of this map.
|
reactor.core.publisher.Flux<K> |
keyIterator(int count)
Returns iterator over key set of this map.
|
reactor.core.publisher.Flux<K> |
keyIterator(String pattern)
Returns iterator over key set of this map.
|
reactor.core.publisher.Flux<K> |
keyIterator(String pattern,
int count)
Returns iterator over key set of this map.
|
reactor.core.publisher.Mono<Void> |
loadAll(boolean replaceExistingValues,
int parallelism)
Loads all map entries to this Redis map using
MapLoader . |
reactor.core.publisher.Mono<Void> |
loadAll(Set<? extends K> keys,
boolean replaceExistingValues,
int parallelism)
Loads map entries using
MapLoader whose keys are listed in defined keys parameter. |
reactor.core.publisher.Mono<V> |
put(K key,
V value)
Associates the specified
value with the specified key
in async manner. |
reactor.core.publisher.Mono<Void> |
putAll(Map<? extends K,? extends V> map)
Associates the specified
value with the specified key
in batch. |
reactor.core.publisher.Mono<V> |
putIfAbsent(K key,
V value)
Associates the specified
value with the specified key
only if there is no any association with specifiedkey . |
reactor.core.publisher.Mono<Set<Map.Entry<K,V>>> |
readAllEntrySet()
Read all map entries at once
|
reactor.core.publisher.Mono<Set<K>> |
readAllKeySet()
Read all keys at once
|
reactor.core.publisher.Mono<Map<K,V>> |
readAllMap()
Read all map as local instance at once
|
reactor.core.publisher.Mono<Collection<V>> |
readAllValues()
Read all values at once
|
reactor.core.publisher.Mono<V> |
remove(K key)
Removes
key from map and returns associated value in async manner. |
reactor.core.publisher.Mono<Boolean> |
remove(Object key,
Object value)
Removes
key from map only if it associated with value . |
reactor.core.publisher.Mono<V> |
replace(K key,
V value)
Replaces previous value with a new
value associated with the key . |
reactor.core.publisher.Mono<Boolean> |
replace(K key,
V oldValue,
V newValue)
Replaces previous
oldValue with a newValue associated with the key . |
reactor.core.publisher.Mono<Integer> |
size() |
reactor.core.publisher.Flux<V> |
valueIterator()
Returns iterator over values collection of this map.
|
reactor.core.publisher.Flux<V> |
valueIterator(int count)
Returns iterator over values collection of this map.
|
reactor.core.publisher.Flux<V> |
valueIterator(String pattern)
Returns iterator over values collection of this map.
|
reactor.core.publisher.Flux<V> |
valueIterator(String pattern,
int count)
Returns iterator over values collection of this map.
|
reactor.core.publisher.Mono<Integer> |
valueSize(K key)
Returns size of value mapped by key in bytes
|
clearExpire, expire, expireAt, expireAt, remainTimeToLive
reactor.core.publisher.Mono<Void> loadAll(boolean replaceExistingValues, int parallelism)
MapLoader
.replaceExistingValues
- - true
if existed values should be replaced, false
otherwise.parallelism
- - parallelism level, used to increase speed of process executionreactor.core.publisher.Mono<Void> loadAll(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 executionreactor.core.publisher.Mono<Integer> valueSize(K key)
key
- - map keyreactor.core.publisher.Mono<Map<K,V>> getAll(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 keysreactor.core.publisher.Mono<Void> putAll(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 mapreactor.core.publisher.Mono<Integer> size()
reactor.core.publisher.Mono<Long> fastRemove(K... keys)
keys
from map by one operation in async manner.
Works faster than
but doesn't return
the value associated with remove(Object, Object)
key
.
If MapWriter
is defined then keys
are deleted in write-through mode.
keys
- - map keysreactor.core.publisher.Mono<Boolean> fastPut(K key, V value)
value
with the specified key
in async manner.
Works faster than
but not returning
the previous value associated with put(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.reactor.core.publisher.Mono<Boolean> fastPutIfAbsent(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 putIfAbsent(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.reactor.core.publisher.Mono<Set<K>> readAllKeySet()
reactor.core.publisher.Mono<Collection<V>> readAllValues()
reactor.core.publisher.Mono<Set<Map.Entry<K,V>>> readAllEntrySet()
reactor.core.publisher.Mono<Map<K,V>> readAllMap()
reactor.core.publisher.Mono<V> get(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 keyreactor.core.publisher.Mono<V> put(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 valuereactor.core.publisher.Mono<V> remove(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 associationreactor.core.publisher.Mono<V> replace(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 madereactor.core.publisher.Mono<Boolean> replace(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
.reactor.core.publisher.Mono<Boolean> remove(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
.reactor.core.publisher.Mono<V> putIfAbsent(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.reactor.core.publisher.Flux<Map.Entry<K,V>> entryIterator()
10
.readAllEntrySet()
reactor.core.publisher.Flux<Map.Entry<K,V>> entryIterator(int count)
count
param.count
- - size of entries batchreadAllEntrySet()
reactor.core.publisher.Flux<Map.Entry<K,V>> entryIterator(String pattern)
10
.
If keyPattern
is not null then only entries mapped by matched keys of this pattern are loaded.
Supported glob-style patterns:
h?llo subscribes to hello, hallo and hxllo
h*llo subscribes to hllo and heeeello
h[ae]llo subscribes to hello and hallo, but not hillo
pattern
- - key patternreadAllEntrySet()
reactor.core.publisher.Flux<Map.Entry<K,V>> entryIterator(String pattern, int count)
count
param.
If keyPattern
is not null then only entries mapped by matched keys of this pattern are loaded.
Supported glob-style patterns:
h?llo subscribes to hello, hallo and hxllo
h*llo subscribes to hllo and heeeello
h[ae]llo subscribes to hello and hallo, but not hillo
pattern
- - key patterncount
- - size of entries batchreadAllEntrySet()
reactor.core.publisher.Flux<V> valueIterator()
10
.readAllValues()
reactor.core.publisher.Flux<V> valueIterator(int count)
count
param.count
- - size of values batchreadAllValues()
reactor.core.publisher.Flux<V> valueIterator(String pattern)
10
.
If keyPattern
is not null then only values mapped by matched keys of this pattern are loaded.
Supported glob-style patterns:
h?llo subscribes to hello, hallo and hxllo
h*llo subscribes to hllo and heeeello
h[ae]llo subscribes to hello and hallo, but not hillo
pattern
- - key patternreadAllValues()
reactor.core.publisher.Flux<V> valueIterator(String pattern, int count)
count
param.
If keyPattern
is not null then only values mapped by matched keys of this pattern are loaded.
Supported glob-style patterns:
h?llo subscribes to hello, hallo and hxllo
h*llo subscribes to hllo and heeeello
h[ae]llo subscribes to hello and hallo, but not hillo
pattern
- - key patterncount
- - size of values batchreadAllValues()
reactor.core.publisher.Flux<K> keyIterator()
10
.readAllKeySet()
reactor.core.publisher.Flux<K> keyIterator(int count)
count
param.count
- - size of keys batchreadAllKeySet()
reactor.core.publisher.Flux<K> keyIterator(String pattern)
pattern
is not null then only keys match this pattern are loaded.
Supported glob-style patterns:
h?llo subscribes to hello, hallo and hxllo
h*llo subscribes to hllo and heeeello
h[ae]llo subscribes to hello and hallo, but not hillo
pattern
- - key patternreadAllKeySet()
reactor.core.publisher.Flux<K> keyIterator(String pattern, int count)
pattern
is not null then only keys match this pattern are loaded.
Keys are loaded in batch. Batch size is defined by count
param.
Supported glob-style patterns:
h?llo subscribes to hello, hallo and hxllo
h*llo subscribes to hllo and heeeello
h[ae]llo subscribes to hello and hallo, but not hillo
pattern
- - key patterncount
- - size of keys batchreadAllKeySet()
RPermitExpirableSemaphoreReactive getPermitExpirableSemaphore(K key)
RPermitExpirableSemaphore
instance associated with keykey
- - map keyRSemaphoreReactive getSemaphore(K key)
RSemaphore
instance associated with keykey
- - map keyRLockReactive getFairLock(K key)
RLock
instance associated with keykey
- - map keyRReadWriteLockReactive getReadWriteLock(K key)
RReadWriteLock
instance associated with keykey
- - map keyRLockReactive getLock(K key)
RLock
instance associated with keykey
- - map keyCopyright © 2014–2019 The Redisson Project. All rights reserved.