V
- - the type of objectpublic interface RBucketRx<V> extends RExpirableRx
Modifier and Type | Method and Description |
---|---|
io.reactivex.Single<Boolean> |
compareAndSet(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.
|
io.reactivex.Maybe<V> |
get()
Retrieves element stored in the holder.
|
io.reactivex.Maybe<V> |
getAndDelete()
Retrieves element in the holder and removes it.
|
io.reactivex.Maybe<V> |
getAndSet(V newValue)
Retrieves current element in the holder and replaces it with
newValue . |
io.reactivex.Maybe<V> |
getAndSet(V value,
long timeToLive,
TimeUnit timeUnit)
Retrieves current element in the holder and replaces it with
newValue with defined timeToLive interval. |
io.reactivex.Completable |
set(V value)
Stores element into the holder.
|
io.reactivex.Completable |
set(V value,
long timeToLive,
TimeUnit timeUnit)
Stores element into the holder with defined
timeToLive interval. |
io.reactivex.Single<Long> |
size()
Returns size of object in bytes
|
io.reactivex.Single<Boolean> |
trySet(V value)
Tries to set element atomically into empty holder.
|
io.reactivex.Single<Boolean> |
trySet(V value,
long timeToLive,
TimeUnit timeUnit)
Tries to set element atomically into empty holder with defined
timeToLive interval. |
clearExpire, expire, expireAt, expireAt, remainTimeToLive
addListener, copy, delete, dump, getCodec, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
io.reactivex.Single<Long> size()
io.reactivex.Single<Boolean> trySet(V value)
value
- - value to settrue
if successful, or false
if
element was already setio.reactivex.Single<Boolean> trySet(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 setio.reactivex.Single<Boolean> compareAndSet(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.io.reactivex.Maybe<V> getAndSet(V newValue)
newValue
.newValue
- - value to setio.reactivex.Maybe<V> getAndSet(V value, long timeToLive, TimeUnit timeUnit)
newValue
with defined timeToLive
interval.value
- - value to settimeToLive
- - time to live intervaltimeUnit
- - unit of time to live intervalio.reactivex.Maybe<V> get()
io.reactivex.Maybe<V> getAndDelete()
io.reactivex.Completable set(V value)
value
- - value to setCopyright © 2014–2020 Redisson. All rights reserved.