Package org.redisson.api
Interface RDoubleAdder
-
- All Superinterfaces:
RDestroyable
,RExpirable
,RExpirableAsync
,RObject
,RObjectAsync
- All Known Implementing Classes:
RedissonDoubleAdder
public interface RDoubleAdder extends RExpirable, RDestroyable
Distributed implementation ofDoubleAdder
Internal state maintained on client side.
- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(double x)
Adds valuevoid
decrement()
Decrements valuevoid
increment()
Increments valuevoid
reset()
Resets value across all RDoubleAdder instancesRFuture<Void>
resetAsync()
Resets value across all RDoubleAdder instancesRFuture<Void>
resetAsync(long timeout, TimeUnit timeUnit)
Resets value across all RDoubleAdder instances within definedtimeout
.double
sum()
Accumulates sum across all RDoubleAdder instancesRFuture<Double>
sumAsync()
Accumulates sum across all RDoubleAdder instancesRFuture<Double>
sumAsync(long timeout, TimeUnit timeUnit)
Accumulates 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, 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(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
RFuture<Double> sumAsync()
Accumulates sum across all RDoubleAdder instances- Returns:
- accumulated sum
-
sumAsync
RFuture<Double> sumAsync(long timeout, TimeUnit timeUnit)
Accumulates sum across all RDoubleAdder instances within definedtimeout
.- Parameters:
timeout
- for accumulationtimeUnit
- for timeout- Returns:
- accumulated sum
-
-