V
- - the type of objectpublic interface RBucketReactive<V> extends RExpirableReactive
Modifier and Type | Method and Description |
---|---|
org.reactivestreams.Publisher<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.
|
org.reactivestreams.Publisher<V> |
get()
Retrieves element stored in the holder.
|
org.reactivestreams.Publisher<V> |
getAndDelete()
Retrieves element in the holder and removes it.
|
org.reactivestreams.Publisher<V> |
getAndSet(V newValue)
Retrieves current element in the holder and replaces it with
newValue . |
org.reactivestreams.Publisher<Void> |
set(V value)
Stores element into the holder.
|
org.reactivestreams.Publisher<Void> |
set(V value,
long timeToLive,
TimeUnit timeUnit)
Stores element into the holder with defined
timeToLive interval. |
org.reactivestreams.Publisher<Long> |
size()
Returns size of object in bytes
|
org.reactivestreams.Publisher<Boolean> |
trySet(V value)
Tries to set element atomically into empty holder.
|
org.reactivestreams.Publisher<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
org.reactivestreams.Publisher<Long> size()
org.reactivestreams.Publisher<Boolean> trySet(V value)
value
- - value to settrue
if successful, or false
if
element was already setorg.reactivestreams.Publisher<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 setorg.reactivestreams.Publisher<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.org.reactivestreams.Publisher<V> getAndSet(V newValue)
newValue
.newValue
- - value to setorg.reactivestreams.Publisher<V> get()
org.reactivestreams.Publisher<V> getAndDelete()
org.reactivestreams.Publisher<Void> set(V value)
value
- - value to setCopyright © 2014–2019 The Redisson Project. All rights reserved.