public class JPAUIDSequencerImpl extends AbstractUIDSequencer
| Modifier and Type | Class and Description |
|---|---|
protected class |
JPAUIDSequencerImpl.SeqRunner |
| Modifier and Type | Field and Description |
|---|---|
static long |
KEEP_ALIVE_TIME |
static int |
MAX_POOL_SIZE |
static int |
POOL_SIZE |
static int |
QUEUE_SIZE |
protected ThreadPoolExecutor |
tpe |
name| Constructor and Description |
|---|
JPAUIDSequencerImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
activatePersistenceProvider() |
void |
dispose()
Must be called when the service is no longer needed
|
protected int |
doGetNext(String key) |
protected int |
getNext(javax.persistence.EntityManager em,
String key) |
long |
getNextLong(String key)
Extends
UIDSequencer.getNext(java.lang.String) to return a long value. |
protected PersistenceProvider |
getOrCreatePersistenceProvider() |
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, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNextBlockpublic static final int POOL_SIZE
public static final int MAX_POOL_SIZE
public static final long KEEP_ALIVE_TIME
public static final int QUEUE_SIZE
protected ThreadPoolExecutor tpe
public JPAUIDSequencerImpl()
public void init()
UIDSequencerpublic void dispose()
protected PersistenceProvider getOrCreatePersistenceProvider()
protected static void activatePersistenceProvider()
public void initSequence(String key, long id)
UIDSequencerA 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 UIDSequencerinitSequence in class AbstractUIDSequencerpublic long getNextLong(String key)
UIDSequencerUIDSequencer.getNext(java.lang.String) to return a long value. This method is compatible
with getNext in the integer range.Copyright © 2019 Nuxeo. All rights reserved.