public class RedisUIDSequencer extends AbstractUIDSequencer
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
log |
protected String |
namespace |
name
Constructor and Description |
---|
RedisUIDSequencer() |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Cleanup callback
|
List<Long> |
getNextBlock(String key,
int blockSize)
Returns a block containing
blockSize sequences. |
long |
getNextLong(String key)
Extends
UIDSequencer.getNext(java.lang.String) to return a long value. |
void |
init()
Init Sequencer
|
void |
initSequence(String key,
long id)
Initializes the sequencer with the given key to at least the given long id.
|
getName, getNext, initSequence, setName
protected static final org.apache.commons.logging.Log log
public RedisUIDSequencer()
public void init()
UIDSequencer
public void dispose()
UIDSequencer
public void initSequence(String key, long id)
UIDSequencer
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.
initSequence
in interface UIDSequencer
initSequence
in class AbstractUIDSequencer
public long getNextLong(String key)
UIDSequencer
UIDSequencer.getNext(java.lang.String)
to return a long value. This method is compatible
with getNext in the integer range.public List<Long> getNextBlock(String key, int blockSize)
UIDSequencer
blockSize
sequences.Copyright © 2019 Nuxeo. All rights reserved.