K
- key typeV
- value typepublic class RedissonTransactionalLocalCachedMap<K,V> extends RedissonTransactionalMap<K,V> implements RLocalCachedMap<K,V>
codec, commandExecutor, name
Constructor and Description |
---|
RedissonTransactionalLocalCachedMap(CommandAsyncExecutor commandExecutor,
List<TransactionalOperation> operations,
long timeout,
AtomicBoolean executed,
RLocalCachedMap<K,V> innerMap,
String transactionId) |
Modifier and Type | Method and Description |
---|---|
Set<Map.Entry<K,V>> |
cachedEntrySet()
Returns all map entries stored in local cache
|
Set<K> |
cachedKeySet()
Returns all keys stored in local cache
|
Collection<V> |
cachedValues()
Returns all values stored in local cache
|
boolean |
clearExpire()
Clear an expire timeout or expire date for object.
|
protected RFuture<Boolean> |
clearExpireAsync(String... keys) |
void |
clearLocalCache()
Clears local cache across all instances
|
RFuture<Void> |
clearLocalCacheAsync()
Clears local cache across all instances
|
void |
destroy()
Destroys object when it's not necessary anymore.
|
boolean |
expire(Instant instant)
Set an expire date for object.
|
boolean |
expire(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object.
|
protected RFuture<Boolean> |
expireAsync(long timeToLive,
TimeUnit timeUnit,
String... keys) |
boolean |
expireAt(Date timestamp)
Use
RExpirable.expire(Instant) instead |
boolean |
expireAt(long timestamp)
Use
RExpirable.expire(Instant) instead |
protected RFuture<Boolean> |
expireAtAsync(long timestamp,
String... keys) |
Map<K,V> |
getCachedMap()
Returns state of local cache
|
void |
preloadCache()
Pre-warm the cached entries.
|
void |
preloadCache(int count)
Pre-warm the cached entries.
|
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
|
addAndGetOperationAsync, checkState, clearExpireAsync, containsKeyAsync, containsValueAsync, deleteAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, fastPutIfAbsentOperationAsync, fastPutIfExistsOperationAsync, fastPutOperationAsync, fastRemoveOperationAsync, getAllOperationAsync, getCountDownLatch, getFairLock, getLock, getOperationAsync, getPermitExpirableSemaphore, getReadWriteLock, getSemaphore, isExistsAsync, loadAllAsync, loadAllAsync, mapReduce, migrateAsync, moveAsync, putAllOperationAsync, putIfAbsentOperationAsync, putIfExistsOperationAsync, putOperationAsync, readAllEntrySetAsync, readAllKeySetAsync, readAllMapAsync, readAllValuesAsync, removeOperationAsync, removeOperationAsync, replaceOperationAsync, replaceOperationAsync, scanIterator, touchAsync, unlinkAsync, valueSizeAsync
addAndGet, addAndGetAsync, checkKey, checkValue, clear, compute, computeAsync, computeIfAbsent, computeIfAbsentAsync, computeIfPresent, computeIfPresentAsync, containsKey, containsValue, entryIterator, entrySet, entrySet, entrySet, entrySet, equals, fastPut, fastPutAsync, fastPutIfAbsent, fastPutIfAbsentAsync, fastPutIfExists, fastPutIfExistsAsync, fastRemove, fastRemoveAsync, fastRemoveOperationBatchAsync, fastReplace, fastReplaceAsync, fastReplaceOperationAsync, get, getAll, getAllAsync, getAsync, hashCode, hasNoLoader, hasNoWriter, isEmpty, keyIterator, keySet, keySet, keySet, keySet, loadAll, loadAll, mapWriterFuture, mapWriterFuture, merge, mergeAsync, put, putAll, putAll, putAllAsync, putAllAsync, putAsync, putIfAbsent, putIfAbsentAsync, putIfExists, putIfExistsAsync, randomEntries, randomEntriesAsync, randomKeys, randomKeysAsync, readAllEntrySet, readAllKeySet, readAllMap, readAllValues, remove, remove, removeAsync, removeAsync, replace, replace, replaceAsync, replaceAsync, scanIteratorAsync, size, sizeAsync, valueIterator, values, values, values, values, valueSize
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, migrate, move, prefixName, removeListener, removeListenerAsync, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, setName, sizeInMemory, sizeInMemoryAsync, sizeInMemoryAsync, sizeInMemoryAsync, suffixName, toSeconds, toStream, touch, unlink
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
addAndGet, containsKey, containsValue, entrySet, entrySet, entrySet, entrySet, fastPut, fastPutIfAbsent, fastPutIfExists, fastRemove, fastReplace, get, getAll, getCountDownLatch, getFairLock, getLock, getPermitExpirableSemaphore, getReadWriteLock, getSemaphore, keySet, keySet, keySet, keySet, loadAll, loadAll, mapReduce, put, putAll, putAll, putIfAbsent, putIfExists, randomEntries, randomKeys, readAllEntrySet, readAllKeySet, readAllMap, readAllValues, remove, remove, replace, replace, values, values, values, values, valueSize
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
clearExpire, expire, expire, expireAt, expireAt, remainTimeToLive
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
addAndGetAsync, computeAsync, computeIfAbsentAsync, computeIfPresentAsync, containsKeyAsync, containsValueAsync, fastPutAsync, fastPutIfAbsentAsync, fastPutIfExistsAsync, fastRemoveAsync, fastReplaceAsync, getAllAsync, getAsync, loadAllAsync, loadAllAsync, mergeAsync, putAllAsync, putAllAsync, putAsync, putIfAbsentAsync, putIfExistsAsync, randomEntriesAsync, randomKeysAsync, readAllEntrySetAsync, readAllKeySetAsync, readAllMapAsync, readAllValuesAsync, removeAsync, removeAsync, replaceAsync, replaceAsync, sizeAsync, valueSizeAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
addListenerAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
public RedissonTransactionalLocalCachedMap(CommandAsyncExecutor commandExecutor, List<TransactionalOperation> operations, long timeout, AtomicBoolean executed, RLocalCachedMap<K,V> innerMap, String transactionId)
public void destroy()
RDestroyable
destroy
in interface RDestroyable
public void preloadCache()
RLocalCachedMap
preloadCache
in interface RLocalCachedMap<K,V>
public void preloadCache(int count)
RLocalCachedMap
count
param.preloadCache
in interface RLocalCachedMap<K,V>
count
- - size of batchpublic RFuture<Void> clearLocalCacheAsync()
RLocalCachedMap
clearLocalCacheAsync
in interface RLocalCachedMap<K,V>
public void clearLocalCache()
RLocalCachedMap
clearLocalCache
in interface RLocalCachedMap<K,V>
public Set<K> cachedKeySet()
RLocalCachedMap
cachedKeySet
in interface RLocalCachedMap<K,V>
public Collection<V> cachedValues()
RLocalCachedMap
cachedValues
in interface RLocalCachedMap<K,V>
public Set<Map.Entry<K,V>> cachedEntrySet()
RLocalCachedMap
cachedEntrySet
in interface RLocalCachedMap<K,V>
public Map<K,V> getCachedMap()
RLocalCachedMap
getCachedMap
in interface RLocalCachedMap<K,V>
public 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
RExpirable.expire(Instant)
insteadexpireAt
in interface RExpirable
timestamp
- - expire date in milliseconds (Unix timestamp)true
if the timeout was set and false
if notpublic boolean expire(Instant instant)
RExpirable
expire
in interface RExpirable
instant
- - expire datetrue
if the timeout was set and false
if notpublic boolean expireAt(Date timestamp)
RExpirable
RExpirable.expire(Instant)
insteadexpireAt
in interface RExpirable
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–2021 Redisson. All rights reserved.