V - value typepublic class RedissonTransactionalBucket<V> extends RedissonBucket<V>
codec, commandExecutor| Constructor and Description |
|---|
RedissonTransactionalBucket(Codec codec,
CommandAsyncExecutor commandExecutor,
String name,
List<TransactionalOperation> operations,
AtomicBoolean executed) |
RedissonTransactionalBucket(CommandAsyncExecutor commandExecutor,
String name,
List<TransactionalOperation> operations,
AtomicBoolean executed) |
| Modifier and Type | Method and Description |
|---|---|
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> |
compareAndSetAsync(V expect,
V update) |
RFuture<Boolean> |
deleteAsync()
Delete object in async mode
|
protected <R> void |
executeLocked(RPromise<R> promise,
Runnable runnable) |
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.
|
RFuture<V> |
getAndDeleteAsync() |
RFuture<V> |
getAndSetAsync(V newValue) |
RFuture<V> |
getAsync() |
RFuture<Boolean> |
isExistsAsync()
Check object existence in async mode.
|
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
|
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<Void> |
setAsync(V newValue) |
RFuture<Void> |
setAsync(V value,
long timeToLive,
TimeUnit timeUnit) |
RFuture<Long> |
sizeAsync()
Returns size of object in bytes
|
RFuture<Boolean> |
touchAsync()
Update the last access time of an object in async mode.
|
RFuture<Boolean> |
trySetAsync(V newValue) |
RFuture<Boolean> |
trySetAsync(V value,
long timeToLive,
TimeUnit timeUnit) |
RFuture<Boolean> |
unlinkAsync()
Delete the objects.
|
compareAndSet, get, getAndDelete, getAndSet, set, set, size, trySet, trySetawait, 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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclearExpire, expire, expireAt, expireAt, remainTimeToLivecopy, delete, getCodec, getName, isExists, migrate, move, rename, renamenx, touch, unlinkremainTimeToLiveAsynccopyAsync, renameAsync, renamenxAsyncpublic RedissonTransactionalBucket(CommandAsyncExecutor commandExecutor, String name, List<TransactionalOperation> operations, AtomicBoolean executed)
public RedissonTransactionalBucket(Codec codec, CommandAsyncExecutor commandExecutor, String name, List<TransactionalOperation> operations, 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 RFuture<Long> sizeAsync()
RBucketAsyncsizeAsync in interface RBucketAsync<V>sizeAsync in class RedissonBucket<V>public RFuture<Boolean> isExistsAsync()
RObjectAsyncisExistsAsync in interface RObjectAsyncisExistsAsync in class RedissonObjecttrue if object exists and false otherwisepublic RFuture<Boolean> touchAsync()
RObjectAsynctouchAsync in interface RObjectAsynctouchAsync in class RedissonObjecttrue if object was touched else falsepublic 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 notpublic RFuture<V> getAsync()
getAsync in interface RBucketAsync<V>getAsync in class RedissonBucket<V>public RFuture<Boolean> compareAndSetAsync(V expect, V update)
compareAndSetAsync in interface RBucketAsync<V>compareAndSetAsync in class RedissonBucket<V>public RFuture<V> getAndSetAsync(V newValue)
getAndSetAsync in interface RBucketAsync<V>getAndSetAsync in class RedissonBucket<V>public RFuture<V> getAndDeleteAsync()
getAndDeleteAsync in interface RBucketAsync<V>getAndDeleteAsync in class RedissonBucket<V>public RFuture<Void> setAsync(V newValue)
setAsync in interface RBucketAsync<V>setAsync in class RedissonBucket<V>public RFuture<Void> setAsync(V value, long timeToLive, TimeUnit timeUnit)
setAsync in interface RBucketAsync<V>setAsync in class RedissonBucket<V>public RFuture<Boolean> trySetAsync(V newValue)
trySetAsync in interface RBucketAsync<V>trySetAsync in class RedissonBucket<V>public RFuture<Boolean> trySetAsync(V value, long timeToLive, TimeUnit timeUnit)
trySetAsync in interface RBucketAsync<V>trySetAsync in class RedissonBucket<V>protected void checkState()
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 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.