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(long timeToLive,
TimeUnit timeUnit)
Set a timeout for object.
|
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.
|
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, expireAtAsync, expireAtAsync, fastPutIfAbsentOperationAsync, fastPutOperationAsync, fastRemoveOperationAsync, getAllOperationAsync, getCountDownLatch, getFairLock, getLock, getOperationAsync, getPermitExpirableSemaphore, getReadWriteLock, getSemaphore, isExistsAsync, loadAllAsync, loadAllAsync, mapReduce, migrateAsync, moveAsync, putAllOperationAsync, putIfAbsentOperationAsync, putOperationAsync, readAllEntrySetAsync, readAllKeySetAsync, readAllMapAsync, readAllValuesAsync, removeOperationAsync, removeOperationAsync, replaceOperationAsync, replaceOperationAsync, scanIterator, touchAsync, unlinkAsync, valueSizeAsync
addAndGet, addAndGetAsync, checkKey, checkValue, clear, containsKey, containsValue, entryIterator, entrySet, entrySet, entrySet, entrySet, equals, fastPut, fastPutAsync, fastPutIfAbsent, fastPutIfAbsentAsync, fastRemove, fastRemoveAsync, fastRemoveOperationBatchAsync, fastReplace, fastReplaceAsync, fastReplaceOperationAsync, get, getAll, getAllAsync, getAsync, hashCode, hasNoLoader, hasNoWriter, isEmpty, keyIterator, keySet, keySet, keySet, keySet, loadAll, loadAll, mapWriterFuture, mapWriterFuture, put, putAll, putAll, putAllAsync, putAllAsync, putAsync, putIfAbsent, putIfAbsentAsync, 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, getLockByMapKey, getLockByValue, getName, getName, isExists, migrate, move, prefixName, removeListener, removeListenerAsync, removeListenersAsync, rename, renameAsync, renamenx, renamenxAsync, restore, restore, restoreAndReplace, restoreAndReplace, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemory, 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, fastRemove, fastReplace, get, getAll, getCountDownLatch, getFairLock, getLock, getPermitExpirableSemaphore, getReadWriteLock, getSemaphore, keySet, keySet, keySet, keySet, loadAll, loadAll, mapReduce, put, putAll, putAll, putIfAbsent, readAllEntrySet, readAllKeySet, readAllMap, readAllValues, remove, remove, replace, replace, values, values, values, values, valueSize
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAll
clearExpire, expire, expireAt, expireAt, remainTimeToLive
addListener, copy, delete, dump, getCodec, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
addAndGetAsync, containsKeyAsync, containsValueAsync, fastPutAsync, fastPutIfAbsentAsync, fastRemoveAsync, fastReplaceAsync, getAllAsync, getAsync, loadAllAsync, loadAllAsync, putAllAsync, putAllAsync, putAsync, putIfAbsentAsync, readAllEntrySetAsync, readAllKeySetAsync, readAllMapAsync, readAllValuesAsync, removeAsync, removeAsync, replaceAsync, replaceAsync, sizeAsync, valueSizeAsync
clearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
addListenerAsync, copyAsync, deleteAsync, dumpAsync, 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
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 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.