Package org.redisson.api
Interface RIdGenerator
- 
- All Superinterfaces:
 RExpirable,RExpirableAsync,RIdGeneratorAsync,RObject,RObjectAsync
- All Known Implementing Classes:
 RedissonIdGenerator
public interface RIdGenerator extends RExpirable, RIdGeneratorAsync
Id generator ofLongtype numbers. Returns unique numbers but not monotonically increased.- Author:
 - Nikita Koksharov
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longnextId()Returns next unique number but not monotonically increasedbooleantryInit(long value, long allocationSize)Initializes Id generator params.- 
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.RIdGeneratorAsync
nextIdAsync, tryInitAsync 
- 
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
- 
tryInit
boolean tryInit(long value, long allocationSize)Initializes Id generator params.- Parameters:
 value- - initial valueallocationSize- - values range allocation size- Returns:
 trueif Id generator initializedfalseif Id generator already initialized
 
- 
nextId
long nextId()
Returns next unique number but not monotonically increased- Returns:
 - number
 
 
 - 
 
 -