K - keyV - valuepublic class RedissonSetMultimap<K,V> extends RedissonMultimap<K,V> implements RSetMultimap<K,V>
codec, commandExecutor| Constructor and Description |
|---|
RedissonSetMultimap(Codec codec,
CommandAsyncExecutor connectionManager,
String name) |
RedissonSetMultimap(CommandAsyncExecutor connectionManager,
String name) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
clearExpire()
Clear an expire timeout or expire date for object.
|
RFuture<Boolean> |
containsEntryAsync(Object key,
Object value)
Returns
true if this multimap contains at least one key-value pair
with the key key and the value value. |
RFuture<Boolean> |
containsKeyAsync(Object key)
Returns
true if this multimap contains at least one key-value pair
with the key key. |
RFuture<Boolean> |
containsValueAsync(Object value)
Returns
true if this multimap contains at least one key-value pair
with the value value. |
Set<Map.Entry<K,V>> |
entries()
Returns a view collection of all key-value pairs contained in this
multimap, as
Map.Entry instances. |
boolean |
expire(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object.
|
boolean |
expireAt(Date timestamp)
Set an expire date for object.
|
boolean |
expireAt(long timestamp)
Set an expire date for object.
|
RFuture<Boolean> |
expireAtAsync(Date timestamp)
Set an expire date for object in async mode.
|
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.
|
RFuture<Collection<V>> |
getAllAsync(K key) |
RFuture<Boolean> |
putAllAsync(K key,
Iterable<? extends V> values)
Stores a key-value pair in this multimap for each of
values, all
using the same key, key. |
RFuture<Boolean> |
putAsync(K key,
V value)
Stores a key-value pair in this multimap.
|
long |
remainTimeToLive()
Remaining time to live of Redisson object that has a timeout
|
RFuture<Long> |
remainTimeToLiveAsync()
Remaining time to live of Redisson object that has a timeout
|
Set<V> |
removeAll(Object key)
Removes all values associated with the key
key. |
RFuture<Collection<V>> |
removeAllAsync(Object key)
Removes all values associated with the key
key. |
RFuture<Boolean> |
removeAsync(Object key,
Object value)
Removes a single key-value pair with the key
key and the value
value from this multimap, if such exists. |
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.
|
RFuture<Collection<V>> |
replaceValuesAsync(K key,
Iterable<? extends V> values)
Stores a collection of values with the same key, replacing any existing
values for that key.
|
RFuture<Integer> |
sizeAsync()
Returns the number of key-value pairs in this multimap.
|
clear, clearExpireAsync, containsEntry, containsKey, containsValue, deleteAsync, expireAsync, expireAtAsync, fastRemove, fastRemoveAsync, fastRemoveAsync, getLock, getReadWriteLock, hash, hashAndRelease, isEmpty, keySet, keySize, keySizeAsync, put, putAll, readAllKeySet, readAllKeySetAsync, remove, size, valuesawait, copy, copyAsync, delete, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getName, getName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, rename, renameAsync, renamenx, renamenxAsync, suffixName, toSeconds, touch, touchAsync, unlink, unlinkAsyncclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, containsEntry, containsKey, containsValue, fastRemove, getLock, getReadWriteLock, isEmpty, keySet, keySize, put, putAll, readAllKeySet, remove, size, valuesclearExpire, expire, expireAt, expireAt, remainTimeToLivecopy, delete, getCodec, getName, isExists, migrate, move, rename, renamenx, touch, unlinkfastRemoveAsync, keySizeAsync, readAllKeySetAsyncclearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsynccopyAsync, deleteAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, touchAsync, unlinkAsyncpublic RedissonSetMultimap(CommandAsyncExecutor connectionManager, String name)
public RedissonSetMultimap(Codec codec, CommandAsyncExecutor connectionManager, String name)
public RFuture<Integer> sizeAsync()
RMultimapAsyncsizeAsync in interface RMultimapAsync<K,V>public RFuture<Boolean> containsKeyAsync(Object key)
RMultimapAsynctrue if this multimap contains at least one key-value pair
with the key key.containsKeyAsync in interface RMultimapAsync<K,V>key - - map keytrue if contains a keypublic RFuture<Boolean> containsValueAsync(Object value)
RMultimapAsynctrue if this multimap contains at least one key-value pair
with the value value.containsValueAsync in interface RMultimapAsync<K,V>value - - map valuetrue if contains a valuepublic RFuture<Boolean> containsEntryAsync(Object key, Object value)
RMultimapAsynctrue if this multimap contains at least one key-value pair
with the key key and the value value.containsEntryAsync in interface RMultimapAsync<K,V>key - - map keyvalue - - map valuetrue if contains an entrypublic RFuture<Boolean> putAsync(K key, V value)
RMultimapAsyncSome multimap implementations allow duplicate key-value pairs, in which
case put always 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.
putAsync in interface RMultimapAsync<K,V>key - - map keyvalue - - map valuetrue if the method increased the size of the multimap, or
false if the multimap already contained the key-value pair and
doesn't allow duplicatespublic RFuture<Boolean> removeAsync(Object key, Object value)
RMultimapAsynckey and the value
value from this multimap, if such exists. If multiple key-value
pairs in the multimap fit this description, which one is removed is
unspecified.removeAsync in interface RMultimapAsync<K,V>key - - map keyvalue - - map valuetrue if the multimap changedpublic RFuture<Boolean> putAllAsync(K key, Iterable<? extends V> values)
RMultimapAsyncvalues, 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 values is empty.
putAllAsync in interface RMultimapAsync<K,V>key - - map keyvalues - - map valuestrue if the multimap changedpublic RSet<V> get(K key)
RSetMultimapkey 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.
public Set<V> getAll(K key)
RMultimappublic RFuture<Collection<V>> getAllAsync(K key)
getAllAsync in interface RMultimapAsync<K,V>public Set<V> removeAll(Object key)
RMultimapkey.
Once this method returns, key will not be mapped to any values
Use RMultimap.fastRemove(K...) if values are not needed.
removeAll in interface RMultimap<K,V>removeAll in interface RSetMultimap<K,V>removeAll in class RedissonMultimap<K,V>key - - map keypublic RFuture<Collection<V>> removeAllAsync(Object key)
RMultimapAsynckey.
Once this method returns, key will not be mapped to any values.
removeAllAsync in interface RMultimapAsync<K,V>key - - map keypublic Set<Map.Entry<K,V>> entries()
RMultimapMap.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.
public Set<V> replaceValues(K key, Iterable<? extends V> values)
RMultimapIf values is empty, this is equivalent to
removeAll(key).
replaceValues in interface RMultimap<K,V>replaceValues in interface RSetMultimap<K,V>replaceValues in class RedissonMultimap<K,V>key - - map keyvalues - - map valuespublic RFuture<Collection<V>> replaceValuesAsync(K key, Iterable<? extends V> values)
RMultimapAsyncIf values is empty, this is equivalent to
RMultimapAsync.removeAllAsync(Object).
replaceValuesAsync in interface RMultimapAsync<K,V>key - - map keyvalues - - map valuespublic boolean expire(long timeToLive,
TimeUnit timeUnit)
RExpirableexpire in interface RExpirabletimeToLive - - timeout before object will be deletedtimeUnit - - timeout time unittrue if the timeout was set and false if notpublic boolean expireAt(long timestamp)
RExpirableexpireAt in interface RExpirabletimestamp - - expire date in milliseconds (Unix timestamp)true if the timeout was set and false if notpublic boolean expireAt(Date timestamp)
RExpirableexpireAt in interface RExpirabletimestamp - - expire datetrue if the timeout was set and false if notpublic RFuture<Boolean> expireAtAsync(Date timestamp)
RExpirableAsyncexpireAtAsync in interface RExpirableAsynctimestamp - - expire datetrue if the timeout was set and false if notpublic boolean clearExpire()
RExpirableclearExpire in interface RExpirabletrue if timeout was removed
false if object does not exist or does not have an associated timeoutpublic long remainTimeToLive()
RExpirableremainTimeToLive in interface RExpirablepublic RFuture<Long> remainTimeToLiveAsync()
RExpirableAsyncremainTimeToLiveAsync in interface RExpirableAsyncCopyright © 2014–2018 The Redisson Project. All rights reserved.