public class RedissonAtomicLong extends Object implements RAtomicLong
AtomicLong
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
|
void |
close() |
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, wait
clearExpire, expire, expireAt, expireAt, remainTimeToLive
public long addAndGet(long delta)
RAtomicLong
addAndGet
in interface RAtomicLong
delta
- the value to addpublic boolean compareAndSet(long expect, long update)
RAtomicLong
==
the expected value.compareAndSet
in interface RAtomicLong
expect
- the expected valueupdate
- the new valuepublic long decrementAndGet()
RAtomicLong
decrementAndGet
in interface RAtomicLong
public long get()
RAtomicLong
get
in interface RAtomicLong
public long getAndAdd(long delta)
RAtomicLong
getAndAdd
in interface RAtomicLong
delta
- the value to addpublic long getAndSet(long newValue)
RAtomicLong
getAndSet
in interface RAtomicLong
newValue
- the new valuepublic long incrementAndGet()
RAtomicLong
incrementAndGet
in interface RAtomicLong
public long getAndIncrement()
RAtomicLong
getAndIncrement
in interface RAtomicLong
public long getAndDecrement()
RAtomicLong
getAndDecrement
in interface RAtomicLong
public void set(long newValue)
RAtomicLong
set
in interface RAtomicLong
newValue
- the new valuepublic boolean expire(long timeToLive, TimeUnit timeUnit)
expire
in interface RExpirable
public boolean expireAt(long timestamp)
expireAt
in interface RExpirable
public boolean expireAt(Date timestamp)
expireAt
in interface RExpirable
public boolean clearExpire()
RExpirable
clearExpire
in interface RExpirable
true
if timeout was removed
false
if object does not exist or does not have an associated timeoutpublic long remainTimeToLive()
RExpirable
remainTimeToLive
in interface RExpirable
protected <V> io.netty.util.concurrent.Promise<V> newPromise()
public void delete()
RObject
public void close()
Copyright © 2014. All rights reserved.