Package org.redisson.api
Interface RMultimapRx<K,V>
-
- Type Parameters:
K
- key typeV
- value type
- All Superinterfaces:
RExpirableRx
,RObjectRx
- All Known Subinterfaces:
RListMultimapCacheRx<K,V>
,RListMultimapRx<K,V>
,RSetMultimapCacheRx<K,V>
,RSetMultimapRx<K,V>
public interface RMultimapRx<K,V> extends RExpirableRx
Base RxJava2 interface for Multimap object- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description io.reactivex.rxjava3.core.Single<>
key, value)
Returnstrue
if this multimap contains at least one key-value pair with the keykey
and the valuevalue
.io.reactivex.rxjava3.core.Single<>
key)
Returnstrue
if this multimap contains at least one key-value pair with the keykey
.io.reactivex.rxjava3.core.Single<>
value)
Returnstrue
if this multimap contains at least one key-value pair with the valuevalue
.io.reactivex.rxjava3.core.Single<>
fastRemove(K... keys)
Removeskeys
from map by one operation Works faster thanRMultimap.remove
but not returning the value associated withkey
io.reactivex.rxjava3.core.Single<>
keySize()
Returns the number of key-value pairs in this multimap.io.reactivex.rxjava3.core.Single<>
put(K key, V value)
Stores a key-value pair in this multimap.io.reactivex.rxjava3.core.Single<>
putAll(K key, <? extends V> values)
Stores a key-value pair in this multimap for each ofvalues
, all using the same key,key
.io.reactivex.rxjava3.core.Single<<K>>
readAllKeySet()
Read all keys at onceio.reactivex.rxjava3.core.Single<>
key, value)
Removes a single key-value pair with the keykey
and the valuevalue
from this multimap, if such exists.io.reactivex.rxjava3.core.Single<>
size()
Returns the number of key-value pairs in this multimap.-
Methods inherited from interface org.redisson.api.RExpirableRx
clearExpire, expire, expireAt, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RObjectRx
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
-
-
-
Method Detail
-
size
io.reactivex.rxjava3.core.Single<> size()
Returns the number of key-value pairs in this multimap.- Returns:
- size of multimap
-
containsKey
io.reactivex.rxjava3.core.Single<> containsKey( key)
Returnstrue
if this multimap contains at least one key-value pair with the keykey
.- Parameters:
key
- - map key- Returns:
true
if contains a key
-
containsValue
io.reactivex.rxjava3.core.Single<> containsValue( value)
Returnstrue
if this multimap contains at least one key-value pair with the valuevalue
.- Parameters:
value
- - map value- Returns:
true
if contains a value
-
containsEntry
io.reactivex.rxjava3.core.Single<> containsEntry( key, value)
Returnstrue
if this multimap contains at least one key-value pair with the keykey
and the valuevalue
.- Parameters:
key
- - map keyvalue
- - map value- Returns:
true
if contains an entry
-
put
io.reactivex.rxjava3.core.Single<> put(K key, V value)
Stores a key-value pair in this multimap.Some multimap implementations allow duplicate key-value pairs, in which case
put
always adds a new key-value pair and increases the multimap size by 1. Other implementations prohibit duplicates, and storing a key-value pair that's already in the multimap has no effect.- Parameters:
key
- - map keyvalue
- - map value- Returns:
true
if the method increased the size of the multimap, orfalse
if the multimap already contained the key-value pair and doesn't allow duplicates
-
remove
io.reactivex.rxjava3.core.Single<> remove( key, value)
Removes a single key-value pair with the keykey
and the valuevalue
from this multimap, if such exists. If multiple key-value pairs in the multimap fit this description, which one is removed is unspecified.- Parameters:
key
- - map keyvalue
- - map value- Returns:
true
if the multimap changed
-
putAll
io.reactivex.rxjava3.core.Single<> putAll(K key, <? extends V> values)
Stores a key-value pair in this multimap for each ofvalues
, all using the same key,key
. Equivalent to (but expected to be more efficient than):for (V value : values) { put(key, value); }
In particular, this is a no-op if
values
is empty.- Parameters:
key
- - map keyvalues
- - map values- Returns:
true
if the multimap changed
-
keySize
io.reactivex.rxjava3.core.Single<> keySize()
Returns the number of key-value pairs in this multimap.- Returns:
- keys amount
-
fastRemove
io.reactivex.rxjava3.core.Single<> fastRemove(K... keys)
Removeskeys
from map by one operation Works faster thanRMultimap.remove
but not returning the value associated withkey
- Parameters:
keys
- - map keys- Returns:
- the number of keys that were removed from the hash, not including specified but non existing keys
-
readAllKeySet
io.reactivex.rxjava3.core.Single<<K>> readAllKeySet()
Read all keys at once- Returns:
- keys
-
-