V
- - the type of objectpublic interface RBucketAsync<V> extends RExpirableAsync
Modifier and Type | Method and Description |
---|---|
RFuture<Integer> |
addListenerAsync(ObjectListener listener)
Adds object event listener
|
RFuture<Boolean> |
compareAndSetAsync(V expect,
V update)
Atomically sets the value to the given updated value
only if serialized state of the current value equals
to serialized state of the expected value.
|
RFuture<V> |
getAndDeleteAsync()
Retrieves element in the holder and removes it.
|
RFuture<V> |
getAndSetAsync(V newValue)
Retrieves current element in the holder and replaces it with
newValue . |
RFuture<V> |
getAndSetAsync(V value,
long timeToLive,
TimeUnit timeUnit)
Retrieves current element in the holder and replaces it with
newValue with defined timeToLive interval. |
RFuture<V> |
getAsync()
Retrieves element stored in the holder.
|
RFuture<Void> |
setAndKeepTTLAsync(V value)
Set value and keep existing TTL.
|
RFuture<Void> |
setAsync(V value)
Stores element into the holder.
|
RFuture<Void> |
setAsync(V value,
long timeToLive,
TimeUnit timeUnit)
Stores element into the holder with defined
timeToLive interval. |
RFuture<Boolean> |
setIfExistsAsync(V value)
Sets value only if it's already exists.
|
RFuture<Boolean> |
setIfExistsAsync(V value,
long timeToLive,
TimeUnit timeUnit)
Sets value only if it's already exists.
|
RFuture<Long> |
sizeAsync()
Returns size of object in bytes
|
RFuture<Boolean> |
trySetAsync(V value)
Tries to set element atomically into empty holder.
|
RFuture<Boolean> |
trySetAsync(V value,
long timeToLive,
TimeUnit timeUnit)
Tries to set element atomically into empty holder with defined
timeToLive interval. |
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
RFuture<V> getAndDeleteAsync()
RFuture<Boolean> trySetAsync(V value)
value
- - value to settrue
if successful, or false
if
element was already setRFuture<Boolean> trySetAsync(V value, long timeToLive, TimeUnit timeUnit)
timeToLive
interval.value
- - value to settimeToLive
- - time to live intervaltimeUnit
- - unit of time to live intervaltrue
if successful, or false
if
element was already setRFuture<Boolean> setIfExistsAsync(V value)
value
- - value to settrue
if successful, or false
if
element wasn't setRFuture<Boolean> setIfExistsAsync(V value, long timeToLive, TimeUnit timeUnit)
value
- - value to settimeToLive
- - time to live intervaltimeUnit
- - unit of time to live intervaltrue
if successful, or false
if
element wasn't setRFuture<Boolean> compareAndSetAsync(V expect, V update)
expect
- the expected valueupdate
- the new valuetrue
if successful; or false
if the actual value
was not equal to the expected value.RFuture<V> getAndSetAsync(V newValue)
newValue
.newValue
- - value to setRFuture<V> getAndSetAsync(V value, long timeToLive, TimeUnit timeUnit)
newValue
with defined timeToLive
interval.value
- - value to settimeToLive
- - time to live intervaltimeUnit
- - unit of time to live intervalRFuture<Void> setAsync(V value)
value
- - value to setRFuture<Void> setAsync(V value, long timeToLive, TimeUnit timeUnit)
timeToLive
interval.value
- - value to settimeToLive
- - time to live intervaltimeUnit
- - unit of time to live intervalRFuture<Void> setAndKeepTTLAsync(V value)
Requires Redis 6.0.0 and higher.
value
- - value to setRFuture<Integer> addListenerAsync(ObjectListener listener)
addListenerAsync
in interface RObjectAsync
listener
- - object event listenerExpiredObjectListener
,
DeletedObjectListener
,
SetObjectListener
Copyright © 2014–2021 Redisson. All rights reserved.