Class RedisUIDSequencer
- java.lang.Object
-
- org.nuxeo.ecm.core.uidgen.AbstractUIDSequencer
-
- org.nuxeo.ecm.core.redis.contribs.RedisUIDSequencer
-
- All Implemented Interfaces:
UIDSequencer
public class RedisUIDSequencer extends AbstractUIDSequencer
Redis-based UID generator.- Since:
- 7.4
-
-
Constructor Summary
Constructors Constructor Description RedisUIDSequencer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Cleanup callbackList<Long>
getNextBlock(String key, int blockSize)
Returns a block containingblockSize
sequences.long
getNextLong(String key)
ExtendsUIDSequencer.getNext(java.lang.String)
to return a long value.void
init()
Init Sequencervoid
initSequence(String key, long id)
Initializes the sequencer with the given key to at least the given long id.-
Methods inherited from class org.nuxeo.ecm.core.uidgen.AbstractUIDSequencer
getName, getNext, initSequence, setName
-
-
-
-
Method Detail
-
init
public void init()
Description copied from interface:UIDSequencer
Init Sequencer
-
dispose
public void dispose()
Description copied from interface:UIDSequencer
Cleanup callback
-
initSequence
public void initSequence(String key, long id)
Description copied from interface:UIDSequencer
Initializes the sequencer with the given key to at least the given long id.A sequence can only be incremented, so if its current id is greater than the given id the sequence won't be decremented to reach the given id.
- Specified by:
initSequence
in interfaceUIDSequencer
- Overrides:
initSequence
in classAbstractUIDSequencer
-
getNextLong
public long getNextLong(String key)
Description copied from interface:UIDSequencer
ExtendsUIDSequencer.getNext(java.lang.String)
to return a long value. This method is compatible with getNext in the integer range.
-
getNextBlock
public List<Long> getNextBlock(String key, int blockSize)
Description copied from interface:UIDSequencer
Returns a block containingblockSize
sequences.
-
-