Package org.redisson.api
Interface RLongAdder
- All Superinterfaces:
RDestroyable
,RExpirable
,RExpirableAsync
,RObject
,RObjectAsync
- All Known Implementing Classes:
RedissonLongAdder
Distributed implementation of
LongAdder
Internal state maintained on client side.
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(long x) Adds valuevoid
Decrements valuevoid
Increments valuevoid
reset()
Resets value across all RLongAdder instancesResets value across all RLongAdder instancesresetAsync
(long timeout, TimeUnit timeUnit) Resets value across all RLongAdder instances within definedtimeout
.long
sum()
Accumulates sum across all RLongAdder instancessumAsync()
Accumulates sum across all RLongAdder instancesAccumulates 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, expire, expireAt, expireAt, expireIfGreater, expireIfGreater, expireIfLess, expireIfLess, expireIfNotSet, expireIfNotSet, expireIfSet, expireIfSet, getExpireTime, remainTimeToLive
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, expireIfGreaterAsync, expireIfGreaterAsync, expireIfLessAsync, expireIfLessAsync, expireIfNotSetAsync, expireIfNotSetAsync, expireIfSetAsync, expireIfSetAsync, getExpireTimeAsync, remainTimeToLiveAsync
Methods inherited from interface org.redisson.api.RObject
addListener, copy, copy, copy, copyAndReplace, copyAndReplace, 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, copyAndReplaceAsync, copyAndReplaceAsync, copyAsync, copyAsync, copyAsync, deleteAsync, dumpAsync, getIdleTimeAsync, isExistsAsync, migrateAsync, moveAsync, removeListenerAsync, renameAsync, renamenxAsync, restoreAndReplaceAsync, restoreAndReplaceAsync, restoreAsync, restoreAsync, sizeInMemoryAsync, touchAsync, unlinkAsync
-
Method Details
-
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
Accumulates sum across all RLongAdder instances- Returns:
- accumulated sum
-
sumAsync
Accumulates sum across all RLongAdder instances within definedtimeout
.- Parameters:
timeout
- for accumulationtimeUnit
- for timeout- Returns:
- accumulated sum
-
resetAsync
Resets value across all RLongAdder instances- Returns:
- void
-
resetAsync
Resets value across all RLongAdder instances within definedtimeout
.- Parameters:
timeout
- for resettimeUnit
- for timeout- Returns:
- void
-