K
- keyV
- valuepublic class RedissonListMultimapCache<K,V> extends RedissonListMultimap<K,V> implements RListMultimapCache<K,V>
codec, commandExecutor, name
Constructor and Description |
---|
RedissonListMultimapCache(EvictionScheduler evictionScheduler,
Codec codec,
CommandAsyncExecutor connectionManager,
String name) |
RedissonListMultimapCache(EvictionScheduler evictionScheduler,
CommandAsyncExecutor connectionManager,
String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
clearExpire()
Clear an expire timeout or expire date for object.
|
RFuture<Boolean> |
clearExpireAsync()
Clear an expire timeout or expire date for object in async mode.
|
protected RFuture<Boolean> |
clearExpireAsync(String... keys) |
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 . |
RFuture<Boolean> |
deleteAsync()
Delete object in async mode
|
boolean |
expire(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object.
|
RFuture<Boolean> |
expireAsync(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object in async mode.
|
protected RFuture<Boolean> |
expireAsync(long timeToLive,
TimeUnit timeUnit,
String... keys) |
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.
|
RFuture<Boolean> |
expireAtAsync(long timestamp)
Set an expire date for object in async mode.
|
protected RFuture<Boolean> |
expireAtAsync(long timestamp,
String... keys) |
boolean |
expireKey(K key,
long timeToLive,
TimeUnit timeUnit)
Set a timeout for key.
|
RFuture<Boolean> |
expireKeyAsync(K key,
long timeToLive,
TimeUnit timeUnit)
Set a timeout for key in async mode.
|
RList<V> |
get(K key)
Returns a view collection of the values associated with
key in this
multimap, if any. |
RFuture<Collection<V>> |
getAllAsync(K key) |
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
|
RFuture<Collection<V>> |
removeAllAsync(Object key)
Removes all values associated with the key
key . |
RFuture<Long> |
sizeInMemoryAsync()
Returns bytes amount used by object in Redis memory.
|
containsEntry, getAll, put, putAllAsync, putAsync, removeAll, removeAsync, replaceValues, replaceValuesAsync, sizeAsync
clear, containsKey, containsValue, entries, fastRemove, fastRemoveAsync, fastRemoveAsync, getCountDownLatch, getFairLock, getLock, getPermitExpirableSemaphore, getReadWriteLock, getSemaphore, hash, isEmpty, keyHash, keySet, keySize, keySizeAsync, putAll, readAllKeySet, readAllKeySetAsync, remove, renameAsync, renamenxAsync, size, values
addListener, addListener, addListenerAsync, addListenerAsync, copy, copyAsync, delete, deleteAsync, dump, dumpAsync, encode, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getIdleTime, getIdleTimeAsync, getLockByMapKey, getLockByValue, getName, getName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, removeListener, removeListenerAsync, removeListenersAsync, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, touchAsync, unlink, unlinkAsync
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAll, removeAll, replaceValues
clear, containsEntry, containsKey, containsValue, entries, fastRemove, getCountDownLatch, getFairLock, getLock, getPermitExpirableSemaphore, getReadWriteLock, getSemaphore, isEmpty, keySet, keySize, put, putAll, readAllKeySet, remove, size, values
clearExpire, expire, expireAt, expireAt, remainTimeToLive
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
fastRemoveAsync, keySizeAsync, putAllAsync, putAsync, readAllKeySetAsync, removeAsync, replaceValuesAsync, sizeAsync
expireAtAsync, remainTimeToLiveAsync
addListenerAsync, copyAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, touchAsync, unlinkAsync
public RedissonListMultimapCache(EvictionScheduler evictionScheduler, CommandAsyncExecutor connectionManager, String name)
public RedissonListMultimapCache(EvictionScheduler evictionScheduler, Codec codec, CommandAsyncExecutor connectionManager, String name)
public RFuture<Boolean> containsKeyAsync(Object key)
RMultimapAsync
true
if this multimap contains at least one key-value pair
with the key key
.containsKeyAsync
in interface RMultimapAsync<K,V>
containsKeyAsync
in class RedissonListMultimap<K,V>
key
- - map keytrue
if contains a keypublic RFuture<Boolean> containsValueAsync(Object value)
RMultimapAsync
true
if this multimap contains at least one key-value pair
with the value value
.containsValueAsync
in interface RMultimapAsync<K,V>
containsValueAsync
in class RedissonListMultimap<K,V>
value
- - map valuetrue
if contains a valuepublic RFuture<Boolean> containsEntryAsync(Object key, Object value)
RMultimapAsync
true
if this multimap contains at least one key-value pair
with the key key
and the value value
.containsEntryAsync
in interface RMultimapAsync<K,V>
containsEntryAsync
in class RedissonListMultimap<K,V>
key
- - map keyvalue
- - map valuetrue
if contains an entrypublic RList<V> get(K key)
RListMultimap
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 RListMultimap
may has duplicates among values mapped by key and stores insertion order
method returns a List
, instead of the Collection
specified in the RMultimap
interface.
public RFuture<Collection<V>> getAllAsync(K key)
getAllAsync
in interface RMultimapAsync<K,V>
getAllAsync
in class RedissonListMultimap<K,V>
public RFuture<Collection<V>> removeAllAsync(Object key)
RMultimapAsync
key
.
Once this method returns, key
will not be mapped to any values.
removeAllAsync
in interface RMultimapAsync<K,V>
removeAllAsync
in class RedissonListMultimap<K,V>
key
- - map keypublic boolean expireKey(K key, long timeToLive, TimeUnit timeUnit)
RMultimapCache
expireKey
in interface RMultimapCache<K,V>
key
- - map keytimeToLive
- - timeout before key will be deletedtimeUnit
- - timeout time unittrue
if key exists and the timeout was set and false
if key not existspublic RFuture<Boolean> expireKeyAsync(K key, long timeToLive, TimeUnit timeUnit)
RMultimapCacheAsync
expireKeyAsync
in interface RMultimapCacheAsync<K,V>
key
- - map keytimeToLive
- - timeout before key will be deletedtimeUnit
- - timeout time unittrue
if key exists and the timeout was set and false
if key not existspublic RFuture<Long> sizeInMemoryAsync()
RObjectAsync
sizeInMemoryAsync
in interface RObjectAsync
sizeInMemoryAsync
in class RedissonMultimap<K,V>
public RFuture<Boolean> deleteAsync()
RObjectAsync
deleteAsync
in interface RObjectAsync
deleteAsync
in class RedissonMultimap<K,V>
true
if object was deleted false
if notpublic RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
RExpirableAsync
expireAsync
in interface RExpirableAsync
expireAsync
in class RedissonMultimap<K,V>
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unittrue
if the timeout was set and false
if notpublic RFuture<Boolean> expireAtAsync(long timestamp)
RExpirableAsync
expireAtAsync
in interface RExpirableAsync
expireAtAsync
in class RedissonMultimap<K,V>
timestamp
- - expire date in milliseconds (Unix timestamp)true
if the timeout was set and false
if notpublic RFuture<Boolean> clearExpireAsync()
RExpirableAsync
clearExpireAsync
in interface RExpirableAsync
clearExpireAsync
in class RedissonMultimap<K,V>
true
if the timeout was cleared and false
if notpublic boolean expire(long timeToLive, TimeUnit timeUnit)
RExpirable
expire
in interface RExpirable
timeToLive
- - timeout before object will be deletedtimeUnit
- - timeout time unittrue
if the timeout was set and false
if notpublic boolean expireAt(long timestamp)
RExpirable
expireAt
in interface RExpirable
timestamp
- - expire date in milliseconds (Unix timestamp)true
if the timeout was set and false
if notpublic boolean expireAt(Date timestamp)
RExpirable
expireAt
in interface RExpirable
timestamp
- - expire datetrue
if the timeout was set and false
if notpublic RFuture<Boolean> expireAtAsync(Date timestamp)
RExpirableAsync
expireAtAsync
in interface RExpirableAsync
timestamp
- - expire datetrue
if the timeout was set and false
if notpublic boolean clearExpire()
RExpirable
clearExpire
in interface RExpirable
true
if timeout was removed
false
if object does not exist or does not have an associated timeoutpublic long remainTimeToLive()
RExpirable
remainTimeToLive
in interface RExpirable
public RFuture<Long> remainTimeToLiveAsync()
RExpirableAsync
remainTimeToLiveAsync
in interface RExpirableAsync
protected RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit, String... keys)
Copyright © 2014–2020 Redisson. All rights reserved.