Package org.redisson.api
Interface RMultimapReactive<K,V>
-
- Type Parameters:
K
- key typeV
- value type
- All Superinterfaces:
RExpirableReactive
,RObjectReactive
- All Known Subinterfaces:
RListMultimapReactive<K,V>
,RSetMultimapReactive<K,V>
public interface RMultimapReactive<K,V> extends RExpirableReactive
Reactive interface for Multimap object- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.reactivestreams.Publisher<Boolean>
containsEntry(Object key, Object value)
Returnstrue
if this multimap contains at least one key-value pair with the keykey
and the valuevalue
.org.reactivestreams.Publisher<Boolean>
containsKey(Object key)
Returnstrue
if this multimap contains at least one key-value pair with the keykey
.org.reactivestreams.Publisher<Boolean>
containsValue(Object value)
Returnstrue
if this multimap contains at least one key-value pair with the valuevalue
.org.reactivestreams.Publisher<Long>
fastRemove(K... keys)
Removeskeys
from map by one operation Works faster thanRMultimap.remove
but not returning the value associated withkey
org.reactivestreams.Publisher<Integer>
keySize()
Returns the number of key-value pairs in this multimap.org.reactivestreams.Publisher<Boolean>
put(K key, V value)
Stores a key-value pair in this multimap.org.reactivestreams.Publisher<Boolean>
putAll(K key, Iterable<? extends V> values)
Stores a key-value pair in this multimap for each ofvalues
, all using the same key,key
.org.reactivestreams.Publisher<Set<K>>
readAllKeySet()
Read all keys at onceorg.reactivestreams.Publisher<Boolean>
remove(Object key, Object value)
Removes a single key-value pair with the keykey
and the valuevalue
from this multimap, if such exists.org.reactivestreams.Publisher<Integer>
size()
Returns the number of key-value pairs in this multimap.-
Methods inherited from interface org.redisson.api.RExpirableReactive
clearExpire, expire, expireAt, expireAt, remainTimeToLive
-
-
-
-
Method Detail
-
size
org.reactivestreams.Publisher<Integer> size()
Returns the number of key-value pairs in this multimap.- Returns:
- size of multimap
-
containsKey
org.reactivestreams.Publisher<Boolean> containsKey(Object 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
org.reactivestreams.Publisher<Boolean> containsValue(Object 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
org.reactivestreams.Publisher<Boolean> containsEntry(Object key, Object 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
org.reactivestreams.Publisher<Boolean> 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
org.reactivestreams.Publisher<Boolean> remove(Object key, Object 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
org.reactivestreams.Publisher<Boolean> putAll(K key, Iterable<? 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
org.reactivestreams.Publisher<Integer> keySize()
Returns the number of key-value pairs in this multimap.- Returns:
- keys amount
-
fastRemove
org.reactivestreams.Publisher<Long> 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
-
-