Package org.redisson.api
Interface RSetMultimapReactive<K,V>
- Type Parameters:
K- key typeV- value type
- All Superinterfaces:
RExpirableReactive,RMultimapReactive<K,,V> RObjectReactive
- All Known Subinterfaces:
RSetMultimapCacheReactive<K,V>
Reactive interface for Set based Multimap
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionReturns a view Set of the values associated withkeyin this multimap, if any.Returns all elements at once.Removes all values associated with the keykey.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.RExpirableReactive
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLiveMethods inherited from interface org.redisson.api.RMultimapReactive
containsEntry, containsKey, containsValue, fastRemove, fastRemoveValue, keySize, put, putAll, readAllKeySet, remove, sizeMethods 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 Details
-
get
Returns a view Set of the values associated withkeyin 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
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
Removes all values associated with the keykey.Once this method returns,
keywill 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
Stores a collection of values with the same key, replacing any existing values for that key.If
valuesis 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.
-