K - key typeV - value typepublic class RedissonTransactionalMap<K,V> extends RedissonMap<K,V>
codec, commandExecutor| Constructor and Description |
|---|
RedissonTransactionalMap(Codec codec,
CommandAsyncExecutor commandExecutor,
String name,
List<TransactionalOperation> operations,
long timeout,
AtomicBoolean executed) |
RedissonTransactionalMap(CommandAsyncExecutor commandExecutor,
List<TransactionalOperation> operations,
long timeout,
AtomicBoolean executed,
RMap<K,V> innerMap) |
RedissonTransactionalMap(CommandAsyncExecutor commandExecutor,
String name,
List<TransactionalOperation> operations,
long timeout,
AtomicBoolean executed) |
| Modifier and Type | Method and Description |
|---|---|
protected RFuture<V> |
addAndGetOperationAsync(K key,
Number value) |
protected void |
checkState() |
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.
|
protected RFuture<Boolean> |
fastPutIfAbsentOperationAsync(K key,
V value) |
protected RFuture<Boolean> |
fastPutOperationAsync(K key,
V value) |
protected RFuture<Long> |
fastRemoveOperationAsync(K... keys) |
RFuture<Map<K,V>> |
getAllOperationAsync(Set<K> keys) |
RLock |
getLock(K key)
Returns
RLock instance associated with key |
RFuture<V> |
getOperationAsync(K key) |
RReadWriteLock |
getReadWriteLock(K key)
Returns
RReadWriteLock instance associated with key |
RFuture<Boolean> |
isExistsAsync()
Check object existence in async mode.
|
RFuture<Void> |
loadAllAsync(boolean replaceExistingValues,
int parallelism)
Loads all map entries to this Redis map using
MapLoader. |
RFuture<Void> |
loadAllAsync(Set<? extends K> keys,
boolean replaceExistingValues,
int parallelism)
Loads map entries using
MapLoader whose keys are listed in defined keys parameter. |
<KOut,VOut> |
mapReduce()
Returns
RMapReduce object associated with this map |
RFuture<Void> |
migrateAsync(String host,
int port,
int database,
long timeout)
Transfer object from source Redis instance to destination Redis instance
in async mode
|
RFuture<Boolean> |
moveAsync(int database)
Move object to another database in async mode
|
protected RFuture<Void> |
putAllOperationAsync(Map<? extends K,? extends V> entries) |
protected RFuture<V> |
putIfAbsentOperationAsync(K key,
V value) |
protected RFuture<V> |
putOperationAsync(K key,
V value) |
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
|
RFuture<Long> |
remainTimeToLiveAsync()
Remaining time to live of Redisson object that has a timeout
|
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<Boolean> |
touchAsync()
Update the last access time of an object in async mode.
|
RFuture<Boolean> |
unlinkAsync()
Delete the objects.
|
RFuture<Integer> |
valueSizeAsync(K key)
Returns size of value mapped by key in bytes
|
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, put, putAll, putAllAsync, putAsync, putIfAbsent, putIfAbsentAsync, readAllEntrySet, readAllKeySet, readAllMap, readAllValues, remove, remove, removeAsync, removeAsync, replace, replace, replaceAsync, replaceAsync, scanIteratorAsync, size, sizeAsync, valueIterator, values, values, values, values, valueSizeawait, copy, copyAsync, delete, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getName, getName, isExists, migrate, move, prefixName, rename, renameAsync, renamenx, renamenxAsync, suffixName, toSeconds, touch, unlinkclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAllclearExpire, expire, expireAt, expireAt, remainTimeToLivecopy, delete, getCodec, getName, isExists, migrate, move, rename, renamenx, touch, unlinkremainTimeToLiveAsynccopyAsync, renameAsync, renamenxAsyncpublic RedissonTransactionalMap(CommandAsyncExecutor commandExecutor, List<TransactionalOperation> operations, long timeout, AtomicBoolean executed, RMap<K,V> innerMap)
public RedissonTransactionalMap(CommandAsyncExecutor commandExecutor, String name, List<TransactionalOperation> operations, long timeout, AtomicBoolean executed)
public RedissonTransactionalMap(Codec codec, CommandAsyncExecutor commandExecutor, String name, List<TransactionalOperation> operations, long timeout, AtomicBoolean executed)
public 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(Date timestamp)
RExpirableAsyncexpireAtAsync in interface RExpirableAsynctimestamp - - expire datetrue 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<Boolean> moveAsync(int database)
RObjectAsyncmoveAsync in interface RObjectAsyncmoveAsync in class RedissonObjectdatabase - - number of Redis databasetrue if key was moved false if notpublic RFuture<Void> migrateAsync(String host, int port, int database, long timeout)
RObjectAsyncmigrateAsync in interface RObjectAsyncmigrateAsync in class RedissonObjecthost - - destination hostport - - destination portdatabase - - destination databasetimeout - - maximum idle time in any moment of the communication with the destination instance in millisecondspublic <KOut,VOut> RMapReduce<K,V,KOut,VOut> mapReduce()
RMapRMapReduce object associated with this mappublic MapScanResult<Object,Object> scanIterator(String name, RedisClient client, long startPos, String pattern, int count)
scanIterator in class RedissonMap<K,V>public 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>protected RFuture<V> addAndGetOperationAsync(K key, Number value)
addAndGetOperationAsync in class RedissonMap<K,V>protected RFuture<V> putIfAbsentOperationAsync(K key, V value)
putIfAbsentOperationAsync in class RedissonMap<K,V>protected RFuture<V> putOperationAsync(K key, V value)
putOperationAsync in class RedissonMap<K,V>protected RFuture<Boolean> fastPutIfAbsentOperationAsync(K key, V value)
fastPutIfAbsentOperationAsync in class RedissonMap<K,V>protected RFuture<Boolean> fastPutOperationAsync(K key, V value)
fastPutOperationAsync in class RedissonMap<K,V>protected RFuture<Long> fastRemoveOperationAsync(K... keys)
fastRemoveOperationAsync in class RedissonMap<K,V>public RFuture<Integer> valueSizeAsync(K key)
RMapAsyncvalueSizeAsync in interface RMapAsync<K,V>valueSizeAsync in class RedissonMap<K,V>key - - map keypublic RFuture<V> getOperationAsync(K key)
getOperationAsync in class RedissonMap<K,V>public 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<Collection<V>> readAllValuesAsync()
RMapAsyncreadAllValuesAsync in interface RMapAsync<K,V>readAllValuesAsync 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<Map<K,V>> getAllOperationAsync(Set<K> keys)
getAllOperationAsync in class RedissonMap<K,V>protected RFuture<V> removeOperationAsync(K key)
removeOperationAsync in class RedissonMap<K,V>protected RFuture<Boolean> removeOperationAsync(Object key, Object value)
removeOperationAsync in class RedissonMap<K,V>protected RFuture<Void> putAllOperationAsync(Map<? extends K,? extends V> entries)
putAllOperationAsync in class RedissonMap<K,V>protected RFuture<Boolean> replaceOperationAsync(K key, V oldValue, V newValue)
replaceOperationAsync in class RedissonMap<K,V>public RFuture<Boolean> touchAsync()
RObjectAsynctouchAsync in interface RObjectAsynctouchAsync in class RedissonObjecttrue if object was touched else falsepublic RFuture<Boolean> isExistsAsync()
RObjectAsyncisExistsAsync in interface RObjectAsyncisExistsAsync in class RedissonObjecttrue if object exists and false otherwisepublic RFuture<Boolean> unlinkAsync()
RObjectAsyncRequires Redis 4.0+
unlinkAsync in interface RObjectAsyncunlinkAsync in class RedissonObjecttrue if it was exist and deleted else falsepublic RFuture<Boolean> deleteAsync()
RObjectAsyncdeleteAsync in interface RObjectAsyncdeleteAsync in class RedissonObjecttrue if object was deleted false if notprotected RFuture<V> replaceOperationAsync(K key, V value)
replaceOperationAsync in class RedissonMap<K,V>protected void checkState()
public RFuture<Void> loadAllAsync(boolean replaceExistingValues, int parallelism)
RMapAsyncMapLoader.loadAllAsync in interface RMapAsync<K,V>loadAllAsync in class RedissonMap<K,V>replaceExistingValues - - true if existed values should be replaced, false otherwise.parallelism - - parallelism level, used to increase speed of process executionpublic RFuture<Void> loadAllAsync(Set<? extends K> keys, boolean replaceExistingValues, int parallelism)
RMapAsyncMapLoader whose keys are listed in defined keys parameter.loadAllAsync in interface RMapAsync<K,V>loadAllAsync in class RedissonMap<K,V>keys - - map keysreplaceExistingValues - - true if existed values should be replaced, false otherwise.parallelism - - parallelism level, used to increase speed of process executionpublic RLock getLock(K key)
RMapRLock instance associated with keypublic RReadWriteLock getReadWriteLock(K key)
RMapRReadWriteLock instance associated with keygetReadWriteLock in interface RMap<K,V>getReadWriteLock in class RedissonMap<K,V>key - - map keypublic 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 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.