Package org.redisson.api
Interface RDoubleAdder
- All Superinterfaces:
RDestroyable
,RExpirable
,RExpirableAsync
,RObject
,RObjectAsync
- All Known Implementing Classes:
RedissonDoubleAdder
Distributed implementation of
DoubleAdder
Internal state maintained on client side.
- Author:
- Nikita Koksharov
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(double x) Adds valuevoid
Decrements valuevoid
Increments valuevoid
reset()
Resets value across all RDoubleAdder instancesResets value across all RDoubleAdder instancesresetAsync
(long timeout, TimeUnit timeUnit) Resets value across all RDoubleAdder instances within definedtimeout
.double
sum()
Accumulates sum across all RDoubleAdder instancessumAsync()
Accumulates sum across all RDoubleAdder instancesAccumulates sum across all RDoubleAdder 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, 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 Details
-
add
void add(double x) Adds value- Parameters:
x
- - value
-
increment
void increment()Increments value -
decrement
void decrement()Decrements value -
sum
double sum()Accumulates sum across all RDoubleAdder instances- Returns:
- accumulated sum
-
reset
void reset()Resets value across all RDoubleAdder instances -
sumAsync
Accumulates sum across all RDoubleAdder instances- Returns:
- accumulated sum
-
sumAsync
Accumulates sum across all RDoubleAdder instances within definedtimeout
.- Parameters:
timeout
- for accumulationtimeUnit
- for timeout- Returns:
- accumulated sum
-
resetAsync
Resets value across all RDoubleAdder instances- Returns:
- void
-
resetAsync
Resets value across all RDoubleAdder instances within definedtimeout
.- Parameters:
timeout
- for resettimeUnit
- for timeout- Returns:
- void
-