Package org.redisson.api
Interface RAtomicLongAsync
-
- All Superinterfaces:
RExpirableAsync
,RObjectAsync
- All Known Subinterfaces:
RAtomicLong
- All Known Implementing Classes:
RedissonAtomicLong
public interface RAtomicLongAsync extends RExpirableAsync
Distributed async implementation of- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description >
addAndGetAsync(long delta)
Atomically adds the given value to the current value.>
compareAndSetAsync(long expect, long update)
Atomically sets the value to the given updated value only if the current value==
the expected value.>
decrementAndGetAsync()
Atomically decrements the current value by one.>
getAndAddAsync(long delta)
Atomically adds the given value to the current value.>
getAndDecrementAsync()
Atomically decrements by one the current value.>
getAndDeleteAsync()
Returns and deletes object>
getAndIncrementAsync()
Atomically increments the current value by one.>
getAndSetAsync(long newValue)
Atomically sets the given value and returns the old value.>
getAsync()
Returns current value.>
incrementAndGetAsync()
Atomically increments the current value by one.>
setAsync(long newValue)
Atomically sets the given value.-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObjectAsync
addListenerAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
-
-
-
Method Detail
-
compareAndSetAsync
> compareAndSetAsync(long expect, long update)
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.
-
addAndGetAsync
> addAndGetAsync(long delta)
Atomically adds the given value to the current value.- Parameters:
delta
- the value to add- Returns:
- the updated value
-
decrementAndGetAsync
> decrementAndGetAsync()
Atomically decrements the current value by one.- Returns:
- the updated value
-
getAsync
> getAsync()
Returns current value.- Returns:
- the current value
-
getAndDeleteAsync
> getAndDeleteAsync()
Returns and deletes object- Returns:
- the current value
-
getAndAddAsync
> getAndAddAsync(long delta)
Atomically adds the given value to the current value.- Parameters:
delta
- the value to add- Returns:
- the old value before the add
-
getAndSetAsync
> getAndSetAsync(long newValue)
Atomically sets the given value and returns the old value.- Parameters:
newValue
- the new value- Returns:
- the old value
-
incrementAndGetAsync
> incrementAndGetAsync()
Atomically increments the current value by one.- Returns:
- the updated value
-
getAndIncrementAsync
> getAndIncrementAsync()
Atomically increments the current value by one.- Returns:
- the old value
-
getAndDecrementAsync
> getAndDecrementAsync()
Atomically decrements by one the current value.- Returns:
- the previous value
-
setAsync
> setAsync(long newValue)
Atomically sets the given value.- Parameters:
newValue
- the new value- Returns:
- void
-
-