K
- keyV
- valuepublic interface RSetMultimap<K,V> extends RMultimap<K,V>
Modifier and Type | Method and Description |
---|---|
Set<Map.Entry<K,V>> |
entries()
Returns a view collection of all key-value pairs contained in this
multimap, as
Map.Entry instances. |
RSet<V> |
get(K key)
Returns a view collection of the values associated with
key in this
multimap, if any. |
Set<V> |
getAll(K key)
Returns all elements at once.
|
Set<V> |
removeAll(Object key)
Removes all values associated with the key
key . |
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.
|
clear, containsEntry, containsKey, containsValue, fastRemove, getLock, getReadWriteLock, isEmpty, keySet, keySize, put, putAll, readAllKeySet, remove, size, values
clearExpire, expire, expireAt, expireAt, remainTimeToLive
copy, delete, dump, getCodec, getName, isExists, migrate, move, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
containsEntryAsync, containsKeyAsync, containsValueAsync, fastRemoveAsync, getAllAsync, keySizeAsync, putAllAsync, putAsync, readAllKeySetAsync, removeAllAsync, removeAsync, replaceValuesAsync, sizeAsync
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
copyAsync, deleteAsync, dumpAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
RSet<V> get(K key)
key
in this
multimap, if any. Note that when containsKey(key)
is false, this
returns an empty collection, not null
.
Changes to the returned collection will update the underlying multimap, and vice versa.
Because a RSetMultiMap
has unique values for a given key, this
method returns a Set
, instead of the Collection
specified in the RMultimap
interface.
Set<V> getAll(K key)
Because a RSetMultiMap
has unique values for a given key, this
method returns a Set
, instead of the Collection
specified in the RMultimap
interface.
Set<V> removeAll(Object key)
key
.
Once this method returns, key
will not be mapped to any values
Use RMultimap.fastRemove(K...)
if values are not needed.
Because a RSetMultiMap
has unique values for a given key, this
method returns a Set
, instead of the Collection
specified in the RMultimap
interface.
Set<V> replaceValues(K key, Iterable<? extends V> values)
If values
is empty, this is equivalent to
removeAll(key)
.
Because a RSetMultiMap
has unique values for a given key, this
method returns a Set
, instead of the Collection
specified in the RMultimap
interface.
Any duplicates in values
will be stored in the multimap once.
replaceValues
in interface RMultimap<K,V>
key
- - map keyvalues
- - map valuesSet<Map.Entry<K,V>> entries()
Map.Entry
instances.
Changes to the returned collection or the entries it contains will update the underlying multimap, and vice versa. However, adding to the returned collection is not possible.
Because a RSetMultiMap
has unique values for a given key, this
method returns a Set
, instead of the Collection
specified in the RMultimap
interface.
Copyright © 2014–2019 The Redisson Project. All rights reserved.