Package org.redisson.api
Interface RIdGeneratorAsync
-
- All Superinterfaces:
RExpirableAsync
,RObjectAsync
- All Known Subinterfaces:
RIdGenerator
- All Known Implementing Classes:
RedissonIdGenerator
public interface RIdGeneratorAsync extends RExpirableAsync
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 >
nextIdAsync()
Returns next unique number but not monotonically increased>
tryInitAsync(long value, long allocationSize)
Initializes Id generator params.-
Methods inherited from interface org.redisson.api.RExpirableAsync
clearExpireAsync, expireAsync, expireAsync, expireAtAsync, expireAtAsync, remainTimeToLiveAsync
-
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
-
tryInitAsync
> tryInitAsync(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
-
nextIdAsync
> nextIdAsync()
Returns next unique number but not monotonically increased- Returns:
- number
-
-