Package org.redisson.api
Interface RSetMultimapRx<K,V>
-
- Type Parameters:
K
- key typeV
- value type
- All Superinterfaces:
RExpirableRx
,RMultimapRx<K,V>
,RObjectRx
- All Known Subinterfaces:
RSetMultimapCacheRx<K,V>
public interface RSetMultimapRx<K,V> extends RMultimapRx<K,V>
RxJava2 interface for Set based Multimap- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RSetRx<V>
get(K key)
Returns a view Set of the values associated withkey
in this multimap, if any.io.reactivex.rxjava3.core.Single<Set<V>>
getAll(K key)
Returns all elements at once.io.reactivex.rxjava3.core.Single<Set<V>>
removeAll(Object key)
Removes all values associated with the keykey
.io.reactivex.rxjava3.core.Single<Set<V>>
replaceValues(K key, Iterable<? extends V> values)
Stores a collection of values with the same key, replacing any existing values for that key.-
Methods inherited from interface org.redisson.api.RExpirableRx
clearExpire, expire, expireAt, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RMultimapRx
containsEntry, containsKey, containsValue, fastRemove, keySize, put, putAll, readAllKeySet, remove, size
-
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
-
get
RSetRx<V> get(K key)
Returns a view Set of the values associated withkey
in this multimap, if any. Note that whencontainsKey(key)
is false, this returns an empty collection, notnull
.Changes to the returned collection will update the underlying multimap, and vice versa.
- Parameters:
key
- - map key- Returns:
- set of values
-
getAll
io.reactivex.rxjava3.core.Single<Set<V>> getAll(K key)
Returns all elements at once. Result Set is NOT backed by map, so changes are not reflected in map.- Parameters:
key
- - map key- Returns:
- set of values
-
removeAll
io.reactivex.rxjava3.core.Single<Set<V>> removeAll(Object key)
Removes all values associated with the keykey
.Once this method returns,
key
will not be mapped to any valuesUse
RMultimapReactive.fastRemove(K...)
if values are not needed.- Parameters:
key
- - map key- Returns:
- the values that were removed (possibly empty). The returned set may be modifiable, but updating it will have no effect on the multimap.
-
replaceValues
io.reactivex.rxjava3.core.Single<Set<V>> replaceValues(K key, Iterable<? extends V> values)
Stores a collection of values with the same key, replacing any existing values for that key.If
values
is empty, this is equivalent toremoveAll(Object)
.- Parameters:
key
- - map keyvalues
- - map values- Returns:
- set of replaced values, or an empty collection if no values were previously associated with the key. Set may be modifiable, but updating it will have no effect on the multimap.
-
-