public abstract class AbstractUIDSequencer extends Object implements UIDSequencer
Constructor and Description |
---|
AbstractUIDSequencer() |
Modifier and Type | Method and Description |
---|---|
String |
getName()
Gets the sequencer name.
|
int |
getNext(String key)
For the given key returns the incremented UID which is also stored in the same sequence entry.
|
void |
initSequence(String key,
int id)
Initializes the sequencer with the given key to at least the given id.
|
void |
initSequence(String key,
long id)
Initializes the sequencer with the given key to at least the given long id.
|
void |
setName(String name)
Sets the sequencer name.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose, getNextLong, init
public AbstractUIDSequencer()
public int getNext(String key)
UIDSequencer
getNext
in interface UIDSequencer
public String getName()
UIDSequencer
getName
in interface UIDSequencer
public void setName(String name)
UIDSequencer
setName
in interface 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
public void initSequence(String key, int id)
UIDSequencer
initSequence
in interface UIDSequencer
Copyright © 2018 Nuxeo. All rights reserved.