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
Base Reactive interface for Multimap object- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description reactor.core.publisher.Mono<Boolean>containsEntry(Object key, Object value)Returnstrueif this multimap contains at least one key-value pair with the keykeyand the valuevalue.reactor.core.publisher.Mono<Boolean>containsKey(Object key)Returnstrueif this multimap contains at least one key-value pair with the keykey.reactor.core.publisher.Mono<Boolean>containsValue(Object value)Returnstrueif this multimap contains at least one key-value pair with the valuevalue.reactor.core.publisher.Mono<Long>fastRemove(K... keys)Removeskeysfrom map by one operation Works faster thanRMultimap.removebut not returning the value associated withkeyreactor.core.publisher.Mono<Integer>keySize()Returns the number of key-value pairs in this multimap.reactor.core.publisher.Mono<Boolean>put(K key, V value)Stores a key-value pair in this multimap.reactor.core.publisher.Mono<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.reactor.core.publisher.Mono<Set<K>>readAllKeySet()Read all keys at oncereactor.core.publisher.Mono<Boolean>remove(Object key, Object value)Removes a single key-value pair with the keykeyand the valuevaluefrom this multimap, if such exists.reactor.core.publisher.Mono<Integer>size()Returns the number of key-value pairs in this multimap.-
Methods inherited from interface org.redisson.api.RExpirableReactive
clearExpire, expire, expireAt, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RObjectReactive
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
-
-
-
Method Detail
-
size
reactor.core.publisher.Mono<Integer> size()
Returns the number of key-value pairs in this multimap.- Returns:
- size of multimap
-
containsKey
reactor.core.publisher.Mono<Boolean> containsKey(Object key)
Returnstrueif this multimap contains at least one key-value pair with the keykey.- Parameters:
key- - map key- Returns:
trueif contains a key
-
containsValue
reactor.core.publisher.Mono<Boolean> containsValue(Object value)
Returnstrueif this multimap contains at least one key-value pair with the valuevalue.- Parameters:
value- - map value- Returns:
trueif contains a value
-
containsEntry
reactor.core.publisher.Mono<Boolean> containsEntry(Object key, Object value)
Returnstrueif this multimap contains at least one key-value pair with the keykeyand the valuevalue.- Parameters:
key- - map keyvalue- - map value- Returns:
trueif contains an entry
-
put
reactor.core.publisher.Mono<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
putalways 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:
trueif the method increased the size of the multimap, orfalseif the multimap already contained the key-value pair and doesn't allow duplicates
-
remove
reactor.core.publisher.Mono<Boolean> remove(Object key, Object value)
Removes a single key-value pair with the keykeyand the valuevaluefrom 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:
trueif the multimap changed
-
putAll
reactor.core.publisher.Mono<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
valuesis empty.- Parameters:
key- - map keyvalues- - map values- Returns:
trueif the multimap changed
-
keySize
reactor.core.publisher.Mono<Integer> keySize()
Returns the number of key-value pairs in this multimap.- Returns:
- keys amount
-
fastRemove
reactor.core.publisher.Mono<Long> fastRemove(K... keys)
Removeskeysfrom map by one operation Works faster thanRMultimap.removebut 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
-
-