Package org.redisson.api
Interface RIdGeneratorReactive
-
- All Superinterfaces:
RExpirableReactive
,RObjectReactive
public interface RIdGeneratorReactive extends RExpirableReactive
Id generator ofLong
type numbers. Returns unique numbers but not monotonically increased.- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description reactor.core.publisher.Mono<Long>
nextId()
Returns next unique number but not monotonically increasedreactor.core.publisher.Mono<Boolean>
tryInit(long value, long allocationSize)
Initializes Id generator params.-
Methods inherited from interface org.redisson.api.RExpirableReactive
clearExpire, expire, expireAt, expireAt, expireAt, remainTimeToLive
-
Methods inherited from interface org.redisson.api.RObjectReactive
addListener, copy, delete, dump, getCodec, getIdleTime, getName, isExists, migrate, move, removeListener, rename, renamenx, restore, restore, restoreAndReplace, restoreAndReplace, sizeInMemory, touch, unlink
-
-
-
-
Method Detail
-
tryInit
reactor.core.publisher.Mono<Boolean> tryInit(long value, long allocationSize)
Initializes Id generator params.- Parameters:
value
- - initial valueallocationSize
- - values range allocation size- Returns:
true
if Id generator initializedfalse
if Id generator already initialized
-
nextId
reactor.core.publisher.Mono<Long> nextId()
Returns next unique number but not monotonically increased- Returns:
- number
-
-