Interface RListMultimap<K,V>
- Type Parameters:
K- keyV- value
- All Superinterfaces:
RExpirable,RExpirableAsync,RMultimap<K,,V> RMultimapAsync<K,,V> RObject,RObjectAsync
- All Known Subinterfaces:
RListMultimapCache<K,,V> RListMultimapCacheNative<K,V>
- All Known Implementing Classes:
RedissonListMultimap,RedissonListMultimapCache,RedissonListMultimapCacheNative
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionReturns a view collection 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.RExpirable
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLiveMethods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsyncMethods inherited from interface org.redisson.api.RMultimap
clear, containsEntry, containsKey, containsValue, entries, fastRemove, fastRemoveValue, getCountDownLatch, getFairLock, getLock, getPermitExpirableSemaphore, getReadWriteLock, getSemaphore, isEmpty, keySet, keySize, put, putAll, readAllKeySet, remove, size, valuesMethods inherited from interface org.redisson.api.RMultimapAsync
containsEntryAsync, containsKeyAsync, containsValueAsync, fastRemoveAsync, fastRemoveValueAsync, getAllAsync, keySizeAsync, putAllAsync, putAsync, readAllKeySetAsync, removeAllAsync, removeAsync, replaceValuesAsync, sizeAsyncMethods inherited from interface org.redisson.api.RObject
addListener, copy, copy, copy, copyAndReplace, copyAndReplace, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlinkMethods inherited from interface org.redisson.api.RObjectAsync
addListenerAsync, copyAndReplaceAsync, copyAndReplaceAsync, copyAsync, copyAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
Method Details
-
get
Returns a view collection 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.
Because a
RListMultimapmay has duplicates among values mapped by key and stores insertion order method returns aList, instead of theCollectionspecified in theRMultimapinterface. -
getAll
Returns all elements at once. Result collection is NOT backed by map, so changes are not reflected in map.Because a
RListMultimapmay has duplicates among values mapped by key and stores insertion order method returns aList, instead of theCollectionspecified in theRMultimapinterface. -
removeAll
Removes all values associated with the keykey.Once this method returns,
keywill not be mapped to any valuesUse
RMultimap.fastRemove(K...)if values are not needed.Because a
RListMultimapmay has duplicates among values mapped by key and stores insertion order method returns aList, instead of theCollectionspecified in theRMultimapinterface. -
replaceValues
Stores a collection of values with the same key, replacing any existing values for that key.If
valuesis empty, this is equivalent toremoveAll(key).Because a
RListMultimapmay has duplicates among values mapped by key and stores insertion order method returns aList, instead of theCollectionspecified in theRMultimapinterface.- Specified by:
replaceValuesin interfaceRMultimap<K,V> - Parameters:
key- - map keyvalues- - map values- Returns:
- the collection of replaced values, or an empty collection if no values were previously associated with the key. The collection may be modifiable, but updating it will have no effect on the multimap.
-