public class RedissonAtomicDouble extends RedissonObject implements RAtomicDouble
AtomicLongcodec, commandExecutor| Constructor and Description |
|---|
RedissonAtomicDouble(CommandAsyncExecutor commandExecutor,
String name) |
| Modifier and Type | Method and Description |
|---|---|
double |
addAndGet(double delta)
Atomically adds the given value to the current value.
|
RFuture<Double> |
addAndGetAsync(double delta) |
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.
|
boolean |
compareAndSet(double expect,
double update)
Atomically sets the value to the given updated value
only if the current value
== the expected value. |
RFuture<Boolean> |
compareAndSetAsync(double expect,
double update) |
double |
decrementAndGet()
Atomically decrements the current value by one.
|
RFuture<Double> |
decrementAndGetAsync() |
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.
|
double |
get()
Gets the current value.
|
double |
getAndAdd(double delta)
Atomically adds the given value to the current value.
|
RFuture<Double> |
getAndAddAsync(double delta) |
double |
getAndDecrement()
Atomically decrements by one the current value.
|
RFuture<Double> |
getAndDecrementAsync() |
double |
getAndDelete()
Gets and deletes object
|
RFuture<Double> |
getAndDeleteAsync()
Gets and deletes object
|
double |
getAndIncrement()
Atomically increments the current value by one.
|
RFuture<Double> |
getAndIncrementAsync() |
double |
getAndSet(double newValue)
Atomically sets the given value and returns the old value.
|
RFuture<Double> |
getAndSetAsync(double newValue) |
RFuture<Double> |
getAsync() |
double |
incrementAndGet()
Atomically increments the current value by one.
|
RFuture<Double> |
incrementAndGetAsync() |
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
|
void |
set(double newValue)
Atomically sets the given value.
|
RFuture<Void> |
setAsync(double newValue) |
String |
toString() |
await, copy, copyAsync, delete, deleteAsync, encode, encode, encode, encodeMapKey, encodeMapKeys, encodeMapValue, encodeMapValues, get, getCodec, getName, getName, isExists, isExistsAsync, migrate, migrateAsync, move, moveAsync, prefixName, rename, renameAsync, renamenx, renamenxAsync, suffixName, toSeconds, touch, touchAsync, unlink, unlinkAsyncclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclearExpire, expire, expireAt, expireAt, remainTimeToLivecopy, delete, getCodec, getName, isExists, migrate, move, rename, renamenx, touch, unlinkclearExpireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsynccopyAsync, deleteAsync, isExistsAsync, migrateAsync, moveAsync, renameAsync, renamenxAsync, touchAsync, unlinkAsyncpublic RedissonAtomicDouble(CommandAsyncExecutor commandExecutor, String name)
public double addAndGet(double delta)
RAtomicDoubleaddAndGet in interface RAtomicDoubledelta - the value to addpublic RFuture<Double> addAndGetAsync(double delta)
addAndGetAsync in interface RAtomicDoubleAsyncpublic boolean compareAndSet(double expect,
double update)
RAtomicDouble== the expected value.compareAndSet in interface RAtomicDoubleexpect - the expected valueupdate - the new valuepublic RFuture<Boolean> compareAndSetAsync(double expect, double update)
compareAndSetAsync in interface RAtomicDoubleAsyncpublic double decrementAndGet()
RAtomicDoubledecrementAndGet in interface RAtomicDoublepublic RFuture<Double> decrementAndGetAsync()
decrementAndGetAsync in interface RAtomicDoubleAsyncpublic double get()
RAtomicDoubleget in interface RAtomicDoublepublic double getAndDelete()
RAtomicDoublegetAndDelete in interface RAtomicDoublepublic RFuture<Double> getAndDeleteAsync()
RAtomicDoubleAsyncgetAndDeleteAsync in interface RAtomicDoubleAsyncpublic RFuture<Double> getAsync()
getAsync in interface RAtomicDoubleAsyncpublic double getAndAdd(double delta)
RAtomicDoublegetAndAdd in interface RAtomicDoubledelta - the value to addpublic RFuture<Double> getAndAddAsync(double delta)
getAndAddAsync in interface RAtomicDoubleAsyncpublic double getAndSet(double newValue)
RAtomicDoublegetAndSet in interface RAtomicDoublenewValue - the new valuepublic RFuture<Double> getAndSetAsync(double newValue)
getAndSetAsync in interface RAtomicDoubleAsyncpublic double incrementAndGet()
RAtomicDoubleincrementAndGet in interface RAtomicDoublepublic RFuture<Double> incrementAndGetAsync()
incrementAndGetAsync in interface RAtomicDoubleAsyncpublic double getAndIncrement()
RAtomicDoublegetAndIncrement in interface RAtomicDoublepublic RFuture<Double> getAndIncrementAsync()
getAndIncrementAsync in interface RAtomicDoubleAsyncpublic double getAndDecrement()
RAtomicDoublegetAndDecrement in interface RAtomicDoublepublic RFuture<Double> getAndDecrementAsync()
getAndDecrementAsync in interface RAtomicDoubleAsyncpublic void set(double newValue)
RAtomicDoubleset in interface RAtomicDoublenewValue - the new valuepublic RFuture<Void> setAsync(double newValue)
setAsync in interface RAtomicDoubleAsyncpublic 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 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 boolean expireAt(long timestamp)
RExpirableexpireAt in interface RExpirabletimestamp - - expire date in milliseconds (Unix timestamp)true 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 boolean expireAt(Date timestamp)
RExpirableexpireAt in interface RExpirabletimestamp - - expire datetrue 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 boolean clearExpire()
RExpirableclearExpire in interface RExpirabletrue if timeout was removed
false if object does not exist or does not have an associated timeoutpublic RFuture<Boolean> clearExpireAsync()
RExpirableAsyncclearExpireAsync in interface RExpirableAsynctrue if the timeout was cleared and false if notpublic long remainTimeToLive()
RExpirableremainTimeToLive in interface RExpirablepublic RFuture<Long> remainTimeToLiveAsync()
RExpirableAsyncremainTimeToLiveAsync in interface RExpirableAsyncCopyright © 2014–2018 The Redisson Project. All rights reserved.