Package org.redisson.api
Interface RLongAdder
-
- All Superinterfaces:
RDestroyable
,RExpirable
,RExpirableAsync
,RObject
,RObjectAsync
- All Known Implementing Classes:
RedissonLongAdder
public interface RLongAdder extends RExpirable, RDestroyable
Distributed implementation ofLongAdder
Internal state maintained on client side.
- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(long x)
Adds valuevoid
decrement()
Decrements valuevoid
increment()
Increments valuevoid
reset()
Resets value across all RLongAdder instancesRFuture<Void>
resetAsync()
Resets value across all RLongAdder instancesRFuture<Void>
resetAsync(long timeout, TimeUnit timeUnit)
Resets value across all RLongAdder instances within definedtimeout
.long
sum()
Accumulates sum across all RLongAdder instancesRFuture<Long>
sumAsync()
Accumulates sum across all RLongAdder instancesRFuture<Long>
sumAsync(long timeout, TimeUnit timeUnit)
Accumulates sum across all RLongAdder instances within definedtimeout
.-
Methods inherited from interface org.redisson.api.RDestroyable
destroy
-
Methods inherited from interface org.redisson.api.RExpirable
clearExpire, expire, expire, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
Methods inherited from interface org.redisson.api.RObject
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
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
-
add
void add(long x)
Adds value- Parameters:
x
- - value
-
increment
void increment()
Increments value
-
decrement
void decrement()
Decrements value
-
sum
long sum()
Accumulates sum across all RLongAdder instances- Returns:
- accumulated sum
-
reset
void reset()
Resets value across all RLongAdder instances
-
sumAsync
RFuture<Long> sumAsync()
Accumulates sum across all RLongAdder instances- Returns:
- accumulated sum
-
sumAsync
RFuture<Long> sumAsync(long timeout, TimeUnit timeUnit)
Accumulates sum across all RLongAdder instances within definedtimeout
.- Parameters:
timeout
- for accumulationtimeUnit
- for timeout- Returns:
- accumulated sum
-
-