Package org.redisson.api
Interface RAtomicLongReactive
- All Superinterfaces:
RExpirableReactive
,RObjectReactive
Reactive interface for AtomicLong object
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Long>
addAndGet
(long delta) Atomically adds the given value to the current value.reactor.core.publisher.Mono<Boolean>
compareAndSet
(long expect, long update) Atomically sets the value to the given updated value only if the current value==
the expected value.reactor.core.publisher.Mono<Long>
Atomically decrements the current value by one.reactor.core.publisher.Mono<Long>
get()
Returns current value.reactor.core.publisher.Mono<Long>
getAndAdd
(long delta) Atomically adds the given value to the current value.reactor.core.publisher.Mono<Long>
Atomically decrements by one the current value.reactor.core.publisher.Mono<Long>
Returns and deletes objectreactor.core.publisher.Mono<Long>
Atomically increments the current value by one.reactor.core.publisher.Mono<Long>
getAndSet
(long newValue) Atomically sets the given value and returns the old value.reactor.core.publisher.Mono<Long>
Atomically increments the current value by one.reactor.core.publisher.Mono<Void>
set
(long newValue) Atomically sets the given value.Methods inherited from interface org.redisson.api.RExpirableReactive
clearExpire, expire, expire, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLive
Methods inherited from interface org.redisson.api.RObjectReactive
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
Method Details
-
compareAndSet
Atomically sets the value to the given updated value only if the current value==
the expected value.- Parameters:
expect
- the expected valueupdate
- the new value- Returns:
- true if successful; or false if the actual value was not equal to the expected value.
-
addAndGet
Atomically adds the given value to the current value.- Parameters:
delta
- the value to add- Returns:
- the updated value
-
decrementAndGet
reactor.core.publisher.Mono<Long> decrementAndGet()Atomically decrements the current value by one.- Returns:
- the updated value
-
get
reactor.core.publisher.Mono<Long> get()Returns current value.- Returns:
- the current value
-
getAndDelete
reactor.core.publisher.Mono<Long> getAndDelete()Returns and deletes object- Returns:
- the current value
-
getAndAdd
Atomically adds the given value to the current value.- Parameters:
delta
- the value to add- Returns:
- the old value before the add
-
getAndSet
Atomically sets the given value and returns the old value.- Parameters:
newValue
- the new value- Returns:
- the old value
-
incrementAndGet
reactor.core.publisher.Mono<Long> incrementAndGet()Atomically increments the current value by one.- Returns:
- the updated value
-
getAndIncrement
reactor.core.publisher.Mono<Long> getAndIncrement()Atomically increments the current value by one.- Returns:
- the old value
-
getAndDecrement
reactor.core.publisher.Mono<Long> getAndDecrement()Atomically decrements by one the current value.- Returns:
- the previous value
-
set
Atomically sets the given value.- Parameters:
newValue
- the new value- Returns:
- void
-