K - keyV - valuepublic class RedissonMapCache<K,V> extends RedissonMap<K,V> implements RMapCache<K,V>
Map-based cache with ability to set TTL for each entry via
put(Object, Object, long, TimeUnit) or putIfAbsent(Object, Object, long, TimeUnit) methods.
And therefore has an complex lua-scripts inside.
Current redis implementation doesnt have map entry eviction functionality.
Thus entries are checked for TTL expiration during any key/value/entry read operation.
If key/value/entry expired then it doesn't returns and clean task runs asynchronous.
Clean task deletes removes 100 expired entries at once.
In addition there is EvictionScheduler. This scheduler
deletes expired entries in time interval between 5 seconds to 2 hours.
If eviction is not required then it's better to use RedissonMap object.
codec, commandExecutor| Constructor and Description |
|---|
RedissonMapCache(Codec codec,
EvictionScheduler evictionScheduler,
CommandAsyncExecutor commandExecutor,
String name,
RedissonClient redisson,
MapOptions<K,V> options) |
RedissonMapCache(EvictionScheduler evictionScheduler,
CommandAsyncExecutor commandExecutor,
String name,
RedissonClient redisson,
MapOptions<K,V> options) |
| Modifier and Type | Method and Description |
|---|---|
V |
addAndGet(K key,
Number value)
Atomically adds the given
delta to the current value
by mapped key. |
protected RFuture<V> |
addAndGetOperationAsync(K key,
Number value) |
int |
addListener(MapEntryListener listener)
Adds map entry listener
|
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.
|
RFuture<Boolean> |
containsKeyAsync(Object key) |
RFuture<Boolean> |
containsValueAsync(Object 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.
|
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.
|
boolean |
fastPut(K key,
V value,
long ttl,
TimeUnit ttlUnit)
Stores value mapped by key with specified time to live.
|
boolean |
fastPut(K key,
V value,
long ttl,
TimeUnit ttlUnit,
long maxIdleTime,
TimeUnit maxIdleUnit)
Stores value mapped by key with specified time to live and max idle time.
|
RFuture<Boolean> |
fastPutAsync(K key,
V value,
long ttl,
TimeUnit ttlUnit)
Stores value mapped by key with specified time to live.
|
RFuture<Boolean> |
fastPutAsync(K key,
V value,
long ttl,
TimeUnit ttlUnit,
long maxIdleTime,
TimeUnit maxIdleUnit)
Stores value mapped by key with specified time to live and max idle time.
|
boolean |
fastPutIfAbsent(K key,
V value,
long ttl,
TimeUnit ttlUnit)
If the specified key is not already associated
with a value, associate it with the given value.
|
boolean |
fastPutIfAbsent(K key,
V value,
long ttl,
TimeUnit ttlUnit,
long maxIdleTime,
TimeUnit maxIdleUnit)
If the specified key is not already associated
with a value, associate it with the given value.
|
RFuture<Boolean> |
fastPutIfAbsentAsync(K key,
V value,
long ttl,
TimeUnit ttlUnit,
long maxIdleTime,
TimeUnit maxIdleUnit)
If the specified key is not already associated
with a value, associate it with the given value.
|
protected RFuture<Boolean> |
fastPutIfAbsentOperationAsync(K key,
V value) |
protected RFuture<Boolean> |
fastPutOperationAsync(K key,
V value) |
protected RFuture<Boolean> |
fastPutOperationAsync(K key,
V value,
long ttl,
TimeUnit ttlUnit,
long maxIdleTime,
TimeUnit maxIdleUnit) |
protected RFuture<Long> |
fastRemoveOperationAsync(K... keys) |
protected RFuture<List<Long>> |
fastRemoveOperationBatchAsync(K... keys) |
protected RFuture<Boolean> |
fastReplaceOperationAsync(K key,
V value) |
RFuture<Map<K,V>> |
getAllOperationAsync(Set<K> keys) |
RFuture<V> |
getOperationAsync(K key) |
V |
put(K key,
V value,
long ttl,
TimeUnit unit)
Stores value mapped by key with specified time to live.
|
V |
put(K key,
V value,
long ttl,
TimeUnit ttlUnit,
long maxIdleTime,
TimeUnit maxIdleUnit)
Stores value mapped by key with specified time to live and max idle time.
|
protected RFuture<Void> |
putAllOperationAsync(Map<? extends K,? extends V> map) |
RFuture<V> |
putAsync(K key,
V value,
long ttl,
TimeUnit ttlUnit)
Stores value mapped by key with specified time to live.
|
RFuture<V> |
putAsync(K key,
V value,
long ttl,
TimeUnit ttlUnit,
long maxIdleTime,
TimeUnit maxIdleUnit)
Stores value mapped by key with specified time to live and max idle time.
|
V |
putIfAbsent(K key,
V value,
long ttl,
TimeUnit ttlUnit)
If the specified key is not already associated
with a value, associate it with the given value.
|
V |
putIfAbsent(K key,
V value,
long ttl,
TimeUnit ttlUnit,
long maxIdleTime,
TimeUnit maxIdleUnit)
If the specified key is not already associated
with a value, associate it with the given value.
|
RFuture<V> |
putIfAbsentAsync(K key,
V value,
long ttl,
TimeUnit ttlUnit)
If the specified key is not already associated
with a value, associate it with the given value.
|
RFuture<V> |
putIfAbsentAsync(K key,
V value,
long ttl,
TimeUnit ttlUnit,
long maxIdleTime,
TimeUnit maxIdleUnit)
If the specified key is not already associated
with a value, associate it with the given value.
|
protected RFuture<V> |
putIfAbsentOperationAsync(K key,
V value) |
protected RFuture<V> |
putOperationAsync(K key,
V value) |
protected RFuture<V> |
putOperationAsync(K key,
V value,
long ttlTimeout,
long maxIdleTimeout,
long maxIdleDelta) |
RFuture<Set<Map.Entry<K,V>>> |
readAllEntrySetAsync()
Read all map entries at once
|
RFuture<Set<K>> |
readAllKeySetAsync()
Read all keys at once
|
RFuture<Map<K,V>> |
readAllMapAsync()
Read all map as local instance at once
|
RFuture<Collection<V>> |
readAllValuesAsync()
Read all values at once
|
long |
remainTimeToLive()
Remaining time to live of Redisson object that has a timeout
|
long |
remainTimeToLive(K key)
Remaining time to live of map entry associated with a
key. |
RFuture<Long> |
remainTimeToLiveAsync()
Remaining time to live of Redisson object that has a timeout
|
RFuture<Long> |
remainTimeToLiveAsync(K key)
Remaining time to live of map entry associated with a
key. |
void |
removeListener(int listenerId)
Removes map entry listener
|
protected RFuture<V> |
removeOperationAsync(K key) |
protected RFuture<Boolean> |
removeOperationAsync(Object key,
Object value) |
protected RFuture<V> |
replaceOperationAsync(K key,
V value) |
protected RFuture<Boolean> |
replaceOperationAsync(K key,
V oldValue,
V newValue) |
MapScanResult<Object,Object> |
scanIterator(String name,
RedisClient client,
long startPos,
String pattern,
int count) |
RFuture<MapScanResult<Object,Object>> |
scanIteratorAsync(String name,
RedisClient client,
long startPos,
String pattern,
int count) |
void |
setMaxSize(int maxSize)
Sets max size of the map.
|
RFuture<Void> |
setMaxSizeAsync(int maxSize)
Sets max size of the map.
|
boolean |
trySetMaxSize(int maxSize)
Tries to set max size of the map.
|
RFuture<Boolean> |
trySetMaxSizeAsync(int maxSize)
Tries to set max size of the map.
|
addAndGetAsync, checkKey, checkValue, clear, containsKey, containsValue, entryIterator, entrySet, entrySet, entrySet, entrySet, equals, fastPut, fastPutAsync, fastPutIfAbsent, fastPutIfAbsentAsync, fastRemove, fastRemoveAsync, fastReplace, fastReplaceAsync, get, getAll, getAllAsync, getAsync, getLock, getReadWriteLock, hashCode, hasNoLoader, hasNoWriter, isEmpty, keyIterator, keySet, keySet, keySet, keySet, loadAll, loadAll, loadAllAsync, loadAllAsync, mapReduce, mapWriterFuture, put, putAll, putAllAsync, putAsync, putIfAbsent, putIfAbsentAsync, readAllEntrySet, readAllKeySet, readAllMap, readAllValues, remove, remove, removeAsync, removeAsync, replace, replace, replaceAsync, replaceAsync, size, sizeAsync, valueIterator, values, values, values, values, valueSize, valueSizeAsyncawait, 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, finalize, getClass, notify, notifyAll, toString, wait, wait, waitentrySet, entrySet, entrySet, entrySet, fastPut, fastPutIfAbsent, fastRemove, fastReplace, get, getAll, getLock, getReadWriteLock, keySet, keySet, keySet, keySet, loadAll, loadAll, mapReduce, put, putAll, putIfAbsent, readAllEntrySet, readAllKeySet, readAllMap, readAllValues, remove, remove, replace, replace, values, values, values, values, valueSizecompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAllclear, containsKey, containsValue, equals, hashCode, isEmptyclearExpire, expire, expireAt, expireAt, remainTimeToLivecopy, delete, getCodec, getName, isExists, migrate, move, rename, renamenx, touch, unlinksizeAsyncaddAndGetAsync, fastPutAsync, fastPutIfAbsentAsync, fastRemoveAsync, fastReplaceAsync, getAllAsync, getAsync, loadAllAsync, loadAllAsync, putAllAsync, putAsync, putIfAbsentAsync, removeAsync, removeAsync, replaceAsync, replaceAsync, valueSizeAsyncexpireAtAsync, remainTimeToLiveAsynccopyAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, touchAsync, unlinkAsyncpublic RedissonMapCache(EvictionScheduler evictionScheduler, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson, MapOptions<K,V> options)
public RedissonMapCache(Codec codec, EvictionScheduler evictionScheduler, CommandAsyncExecutor commandExecutor, String name, RedissonClient redisson, MapOptions<K,V> options)
public boolean trySetMaxSize(int maxSize)
RMapCachetrySetMaxSize in interface RMapCache<K,V>maxSize - - max sizetrue if max size has been successfully set, otherwise false.
If 0 the cache is unbounded (default).public RFuture<Boolean> trySetMaxSizeAsync(int maxSize)
RMapCacheAsynctrySetMaxSizeAsync in interface RMapCacheAsync<K,V>maxSize - - max sizetrue if max size has been successfully set, otherwise false.public void setMaxSize(int maxSize)
RMapCachesetMaxSize in interface RMapCache<K,V>maxSize - - max size
If 0 the cache is unbounded (default).public RFuture<Void> setMaxSizeAsync(int maxSize)
RMapCacheAsyncsetMaxSizeAsync in interface RMapCacheAsync<K,V>maxSize - - max sizepublic RFuture<Boolean> containsKeyAsync(Object key)
containsKeyAsync in interface RMapAsync<K,V>containsKeyAsync in class RedissonMap<K,V>public RFuture<Boolean> containsValueAsync(Object value)
containsValueAsync in interface RMapAsync<K,V>containsValueAsync in class RedissonMap<K,V>public RFuture<Map<K,V>> getAllOperationAsync(Set<K> keys)
getAllOperationAsync in class RedissonMap<K,V>public V putIfAbsent(K key, V value, long ttl, TimeUnit ttlUnit)
RMapCacheStores value mapped by key with specified time to live. Entry expires after specified time to live.
putIfAbsent in interface RMapCache<K,V>key - - map keyvalue - - map valuettl - - time to live for key\value entry.
If 0 then stores infinitely.ttlUnit - - time unitpublic RFuture<V> putIfAbsentAsync(K key, V value, long ttl, TimeUnit ttlUnit)
RMapCacheAsyncStores value mapped by key with specified time to live. Entry expires after specified time to live. If the map previously contained a mapping for the key, the old value is replaced by the specified value.
putIfAbsentAsync in interface RMapCacheAsync<K,V>key - - map keyvalue - - map valuettl - - time to live for key\value entry.
If 0 then stores infinitely.ttlUnit - - time unitpublic V putIfAbsent(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit)
RMapCacheStores value mapped by key with specified time to live and max idle time. Entry expires when specified time to live or max idle time has expired.
putIfAbsent in interface RMapCache<K,V>key - - map keyvalue - - map valuettl - - time to live for key\value entry.
If 0 then time to live doesn't affect entry expiration.ttlUnit - - time unitmaxIdleTime - - max idle time for key\value entry.
If 0 then max idle time doesn't affect entry expiration.maxIdleUnit - - time unit
if maxIdleTime and ttl params are equal to 0
then entry stores infinitely.
public RFuture<V> putIfAbsentAsync(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit)
RMapCacheAsyncStores value mapped by key with specified time to live and max idle time. Entry expires when specified time to live or max idle time has expired.
If the map previously contained a mapping for the key, the old value is replaced by the specified value.
putIfAbsentAsync in interface RMapCacheAsync<K,V>key - - map keyvalue - - map valuettl - - time to live for key\value entry.
If 0 then time to live doesn't affect entry expiration.ttlUnit - - time unitmaxIdleTime - - max idle time for key\value entry.
If 0 then max idle time doesn't affect entry expiration.maxIdleUnit - - time unit
if maxIdleTime and ttl params are equal to 0
then entry stores infinitely.
protected RFuture<Boolean> removeOperationAsync(Object key, Object value)
removeOperationAsync in class RedissonMap<K,V>public RFuture<V> getOperationAsync(K key)
getOperationAsync in class RedissonMap<K,V>public V put(K key, V value, long ttl, TimeUnit unit)
RMapCacheIf the map previously contained a mapping for the key, the old value is replaced by the specified value.
protected RFuture<V> putOperationAsync(K key, V value)
putOperationAsync in class RedissonMap<K,V>protected RFuture<V> putIfAbsentOperationAsync(K key, V value)
putIfAbsentOperationAsync in class RedissonMap<K,V>public V addAndGet(K key, Number value)
RMapdelta to the current value
by mapped key.
Works only for numeric values!protected RFuture<V> addAndGetOperationAsync(K key, Number value)
addAndGetOperationAsync in class RedissonMap<K,V>public boolean fastPut(K key, V value, long ttl, TimeUnit ttlUnit)
RMapCacheIf the map previously contained a mapping for the key, the old value is replaced by the specified value.
Works faster than usual RMapCache.put(Object, Object, long, TimeUnit)
as it not returns previous value.
fastPut in interface RMapCache<K,V>key - - map keyvalue - - map valuettl - - time to live for key\value entry.
If 0 then stores infinitely.ttlUnit - - time unittrue if key is a new key in the hash and value was set.
false if key already exists in the hash and the value was updated.public RFuture<Boolean> fastPutAsync(K key, V value, long ttl, TimeUnit ttlUnit)
RMapCacheAsyncIf the map previously contained a mapping for the key, the old value is replaced by the specified value.
Works faster than usual RMapCacheAsync.putAsync(Object, Object, long, TimeUnit)
as it not returns previous value.
fastPutAsync in interface RMapCacheAsync<K,V>key - - map keyvalue - - map valuettl - - time to live for key\value entry.
If 0 then stores infinitely.ttlUnit - - time unittrue if key is a new key in the hash and value was set.
false if key already exists in the hash and the value was updated.public boolean fastPut(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit)
RMapCacheIf the map previously contained a mapping for the key, the old value is replaced by the specified value.
Works faster than usual RMapCache.put(Object, Object, long, TimeUnit, long, TimeUnit)
as it not returns previous value.
fastPut in interface RMapCache<K,V>key - - map keyvalue - - map valuettl - - time to live for key\value entry.
If 0 then time to live doesn't affect entry expiration.ttlUnit - - time unitmaxIdleTime - - max idle time for key\value entry.
If 0 then max idle time doesn't affect entry expiration.maxIdleUnit - - time unit
if maxIdleTime and ttl params are equal to 0
then entry stores infinitely.
true if key is a new key in the hash and value was set.
false if key already exists in the hash and the value was updated.public RFuture<Boolean> fastPutAsync(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit)
RMapCacheAsyncIf the map previously contained a mapping for the key, the old value is replaced by the specified value.
Works faster than usual RMapCacheAsync.putAsync(Object, Object, long, TimeUnit, long, TimeUnit)
as it not returns previous value.
fastPutAsync in interface RMapCacheAsync<K,V>key - - map keyvalue - - map valuettl - - time to live for key\value entry.
If 0 then time to live doesn't affect entry expiration.ttlUnit - - time unitmaxIdleTime - - max idle time for key\value entry.
If 0 then max idle time doesn't affect entry expiration.maxIdleUnit - - time unit
if maxIdleTime and ttl params are equal to 0
then entry stores infinitely.
true if key is a new key in the hash and value was set.
false if key already exists in the hash and the value was updated.protected RFuture<Boolean> fastPutOperationAsync(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit)
public RFuture<V> putAsync(K key, V value, long ttl, TimeUnit ttlUnit)
RMapCacheAsyncputAsync in interface RMapCacheAsync<K,V>key - - map keyvalue - - map valuettl - - time to live for key\value entry.
If 0 then stores infinitely.ttlUnit - - time unitpublic V put(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit)
RMapCacheIf the map previously contained a mapping for the key, the old value is replaced by the specified value.
put in interface RMapCache<K,V>key - - map keyvalue - - map valuettl - - time to live for key\value entry.
If 0 then time to live doesn't affect entry expiration.ttlUnit - - time unitmaxIdleTime - - max idle time for key\value entry.
If 0 then max idle time doesn't affect entry expiration.maxIdleUnit - - time unit
if maxIdleTime and ttl params are equal to 0
then entry stores infinitely.
public RFuture<V> putAsync(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit)
RMapCacheAsyncIf the map previously contained a mapping for the key, the old value is replaced by the specified value.
putAsync in interface RMapCacheAsync<K,V>key - - map keyvalue - - map valuettl - - time to live for key\value entry.
If 0 then time to live doesn't affect entry expiration.ttlUnit - - time unitmaxIdleTime - - max idle time for key\value entry.
If 0 then max idle time doesn't affect entry expiration.maxIdleUnit - - time unit
if maxIdleTime and ttl params are equal to 0
then entry stores infinitely.
protected RFuture<V> putOperationAsync(K key, V value, long ttlTimeout, long maxIdleTimeout, long maxIdleDelta)
public long remainTimeToLive(K key)
RMapCachekey.remainTimeToLive in interface RMapCache<K,V>key - - map keypublic RFuture<Long> remainTimeToLiveAsync(K key)
RMapCacheAsynckey.remainTimeToLiveAsync in interface RMapCacheAsync<K,V>key - - map keyprotected RFuture<V> removeOperationAsync(K key)
removeOperationAsync in class RedissonMap<K,V>protected RFuture<List<Long>> fastRemoveOperationBatchAsync(K... keys)
fastRemoveOperationBatchAsync in class RedissonMap<K,V>protected RFuture<Long> fastRemoveOperationAsync(K... keys)
fastRemoveOperationAsync in class RedissonMap<K,V>public MapScanResult<Object,Object> scanIterator(String name, RedisClient client, long startPos, String pattern, int count)
scanIterator in class RedissonMap<K,V>public RFuture<MapScanResult<Object,Object>> scanIteratorAsync(String name, RedisClient client, long startPos, String pattern, int count)
scanIteratorAsync in class RedissonMap<K,V>protected RFuture<Boolean> fastPutOperationAsync(K key, V value)
fastPutOperationAsync in class RedissonMap<K,V>protected RFuture<Boolean> fastPutIfAbsentOperationAsync(K key, V value)
fastPutIfAbsentOperationAsync in class RedissonMap<K,V>public boolean fastPutIfAbsent(K key, V value, long ttl, TimeUnit ttlUnit)
RMapCacheStores value mapped by key with specified time to live. Entry expires after specified time to live.
Works faster than usual RMapCache.putIfAbsent(Object, Object, long, TimeUnit)
as it not returns previous value.
fastPutIfAbsent in interface RMapCache<K,V>key - - map keyvalue - - map valuettl - - time to live for key\value entry.
If 0 then stores infinitely.ttlUnit - - time unittrue if key is a new key in the hash and value was set.
false if key already exists in the hashpublic boolean fastPutIfAbsent(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit)
RMapCacheStores value mapped by key with specified time to live and max idle time. Entry expires when specified time to live or max idle time has expired.
Works faster than usual RMapCache.putIfAbsent(Object, Object, long, TimeUnit, long, TimeUnit)
as it not returns previous value.
fastPutIfAbsent in interface RMapCache<K,V>key - - map keyvalue - - map valuettl - - time to live for key\value entry.
If 0 then time to live doesn't affect entry expiration.ttlUnit - - time unitmaxIdleTime - - max idle time for key\value entry.
If 0 then max idle time doesn't affect entry expiration.maxIdleUnit - - time unit
if maxIdleTime and ttl params are equal to 0
then entry stores infinitely.
true if key is a new key in the hash and value was set.
false if key already exists in the hash.public RFuture<Boolean> fastPutIfAbsentAsync(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit)
RMapCacheAsyncStores value mapped by key with specified time to live and max idle time. Entry expires when specified time to live or max idle time has expired.
Works faster than usual RMapCacheAsync.putIfAbsentAsync(Object, Object, long, TimeUnit, long, TimeUnit)
as it not returns previous value.
fastPutIfAbsentAsync in interface RMapCacheAsync<K,V>key - - map keyvalue - - map valuettl - - time to live for key\value entry.
If 0 then time to live doesn't affect entry expiration.ttlUnit - - time unitmaxIdleTime - - max idle time for key\value entry.
If 0 then max idle time doesn't affect entry expiration.maxIdleUnit - - time unit
if maxIdleTime and ttl params are equal to 0
then entry stores infinitely.
true if key is a new key in the hash and value was set.
false if key already exists in the hashprotected RFuture<Boolean> replaceOperationAsync(K key, V oldValue, V newValue)
replaceOperationAsync in class RedissonMap<K,V>protected RFuture<Boolean> fastReplaceOperationAsync(K key, V value)
fastReplaceOperationAsync in class RedissonMap<K,V>protected RFuture<V> replaceOperationAsync(K key, V value)
replaceOperationAsync in class RedissonMap<K,V>protected RFuture<Void> putAllOperationAsync(Map<? extends K,? extends V> map)
putAllOperationAsync in class RedissonMap<K,V>public int addListener(MapEntryListener listener)
RMapCacheaddListener in interface RMapCache<K,V>listener - - entry listenerEntryCreatedListener,
EntryUpdatedListener,
EntryRemovedListener,
EntryExpiredListenerpublic void removeListener(int listenerId)
RMapCacheremoveListener in interface RMapCache<K,V>listenerId - - listener idpublic RFuture<Boolean> deleteAsync()
RObjectAsyncdeleteAsync in interface RObjectAsyncdeleteAsync in class RedissonObjecttrue if object was deleted false if notpublic RFuture<Boolean> expireAsync(long timeToLive, TimeUnit timeUnit)
RExpirableAsyncexpireAsync in interface RExpirableAsynctimeToLive - - timeout before object will be deletedtimeUnit - - timeout time unittrue if the timeout was set and false if notpublic RFuture<Boolean> expireAtAsync(long timestamp)
RExpirableAsyncexpireAtAsync in interface RExpirableAsynctimestamp - - expire date in seconds (Unix timestamp)true if the timeout was set and false if notpublic RFuture<Boolean> clearExpireAsync()
RExpirableAsyncclearExpireAsync in interface RExpirableAsynctrue if the timeout was cleared and false if notpublic RFuture<Set<K>> readAllKeySetAsync()
RMapAsyncreadAllKeySetAsync in interface RMapAsync<K,V>readAllKeySetAsync in class RedissonMap<K,V>public RFuture<Set<Map.Entry<K,V>>> readAllEntrySetAsync()
RMapAsyncreadAllEntrySetAsync in interface RMapAsync<K,V>readAllEntrySetAsync in class RedissonMap<K,V>public RFuture<Map<K,V>> readAllMapAsync()
RMapAsyncreadAllMapAsync in interface RMapAsync<K,V>readAllMapAsync in class RedissonMap<K,V>public RFuture<Collection<V>> readAllValuesAsync()
RMapAsyncreadAllValuesAsync in interface RMapAsync<K,V>readAllValuesAsync in class RedissonMap<K,V>public 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.