public class RedissonAtomicLong extends Object implements RAtomicLong
AtomicLong| Modifier | Constructor and Description |
|---|---|
protected |
RedissonAtomicLong(ConnectionManager connectionManager,
String name) |
| Modifier and Type | Method and Description |
|---|---|
long |
addAndGet(long delta)
Atomically adds the given value to the current value.
|
boolean |
clearExpire()
Remove the existing timeout of Redisson object
|
boolean |
compareAndSet(long expect,
long update)
Atomically sets the value to the given updated value
only if the current value
== the expected value. |
long |
decrementAndGet()
Atomically decrements the current value by one.
|
void |
delete()
Deletes the object
|
boolean |
expire(long timeToLive,
TimeUnit timeUnit) |
boolean |
expireAt(Date timestamp) |
boolean |
expireAt(long timestamp) |
long |
get()
Gets the current value.
|
long |
getAndAdd(long delta)
Atomically adds the given value to the current value.
|
long |
getAndDecrement()
Atomically decrements by one the current value.
|
long |
getAndIncrement()
Atomically increments the current value by one.
|
long |
getAndSet(long newValue)
Atomically sets the given value and returns the old value.
|
String |
getName()
Returns name of object
|
long |
incrementAndGet()
Atomically increments the current value by one.
|
protected <V> io.netty.util.concurrent.Promise<V> |
newPromise() |
long |
remainTimeToLive()
Remaining time to live of Redisson object that has a timeout
|
void |
set(long newValue)
Atomically sets the given value.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclearExpire, expire, expireAt, expireAt, remainTimeToLiveprotected RedissonAtomicLong(ConnectionManager connectionManager, String name)
public long addAndGet(long delta)
RAtomicLongaddAndGet in interface RAtomicLongdelta - the value to addpublic boolean compareAndSet(long expect,
long update)
RAtomicLong== the expected value.compareAndSet in interface RAtomicLongexpect - the expected valueupdate - the new valuepublic long decrementAndGet()
RAtomicLongdecrementAndGet in interface RAtomicLongpublic long get()
RAtomicLongget in interface RAtomicLongpublic long getAndAdd(long delta)
RAtomicLonggetAndAdd in interface RAtomicLongdelta - the value to addpublic long getAndSet(long newValue)
RAtomicLonggetAndSet in interface RAtomicLongnewValue - the new valuepublic long incrementAndGet()
RAtomicLongincrementAndGet in interface RAtomicLongpublic long getAndIncrement()
RAtomicLonggetAndIncrement in interface RAtomicLongpublic long getAndDecrement()
RAtomicLonggetAndDecrement in interface RAtomicLongpublic void set(long newValue)
RAtomicLongset in interface RAtomicLongnewValue - the new valuepublic boolean expire(long timeToLive,
TimeUnit timeUnit)
expire in interface RExpirablepublic boolean expireAt(long timestamp)
expireAt in interface RExpirablepublic boolean expireAt(Date timestamp)
expireAt in interface RExpirablepublic boolean clearExpire()
RExpirableclearExpire in interface RExpirabletrue if timeout was removed
false if object does not exist or does not have an associated timeoutpublic long remainTimeToLive()
RExpirableremainTimeToLive in interface RExpirableprotected <V> io.netty.util.concurrent.Promise<V> newPromise()
Copyright © 2014–2015. All rights reserved.