public class NucleusSequenceImpl extends Object implements NucleusSequence
Modifier and Type | Field and Description |
---|---|
protected ExecutionContext |
ec
execution context.
|
protected ValueGenerator |
generator
The generator for the sequence.
|
protected SequenceMetaData |
seqMetaData
Name of the sequence.
|
protected StoreManager |
storeManager
Store Manager where we obtain our sequence.
|
Constructor and Description |
---|
NucleusSequenceImpl(ExecutionContext objectMgr,
StoreManager storeMgr,
SequenceMetaData seqmd)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
allocate(int additional)
Method to allocate a set of elements.
|
Object |
current()
Accessor for the current element.
|
long |
currentValue()
Accessor for the current element in the sequence as a long.
|
String |
getName()
Accessor for the sequence name.
|
Object |
next()
Accessor for the next element in the sequence.
|
long |
nextValue()
Accessor for the next element in the sequence as a long.
|
protected void |
setGenerator()
Method to set the value generator to use.
|
protected final StoreManager storeManager
protected final SequenceMetaData seqMetaData
protected ValueGenerator generator
protected final ExecutionContext ec
public NucleusSequenceImpl(ExecutionContext objectMgr, StoreManager storeMgr, SequenceMetaData seqmd)
objectMgr
- The ExecutionContext managing the sequencestoreMgr
- Manager of the store where we obtain the sequenceseqmd
- MetaData defining the sequenceprotected void setGenerator()
public String getName()
getName
in interface NucleusSequence
public void allocate(int additional)
allocate
in interface NucleusSequence
additional
- The number of additional elements to allocatepublic Object next()
next
in interface NucleusSequence
public long nextValue()
nextValue
in interface NucleusSequence
public Object current()
current
in interface NucleusSequence
public long currentValue()
currentValue
in interface NucleusSequence
Copyright © 2019. All rights reserved.