public interface SequenceValueProducer
Sequence
Modifier and Type | Method and Description |
---|---|
java.lang.String |
nextDecimalValue()
Returns the next decimal string value from the sequence, which remains
positive.
|
int |
nextIntValue()
Returns the next value from the sequence, which may wrap negative if all
positive values are exhausted.
|
long |
nextLongValue()
Returns the next value from the sequence, which may wrap negative if all
positive values are exhausted.
|
java.lang.String |
nextNumericalValue(int radix,
int minLength)
Returns the next numerical string value from the sequence, which remains
positive.
|
boolean |
returnReservedValues()
Allow any unused reserved values to be returned for re-use.
|
long nextLongValue() throws PersistException
Note: this method throws PersistException even for fetch failures since this method is called by insert operations. Insert operations can only throw a PersistException.
PersistException
- for fetch/persist failure or if sequence is exhausted.int nextIntValue() throws PersistException
Note: this method throws PersistException even for fetch failures since this method is called by insert operations. Insert operations can only throw a PersistException.
PersistException
- for fetch/persist failure or if sequence is
exhausted for int values.java.lang.String nextDecimalValue() throws PersistException
Note: this method throws PersistException even for fetch failures since this method is called by insert operations. Insert operations can only throw a PersistException.
PersistException
- for fetch/persist failure or if sequence is exhausted.java.lang.String nextNumericalValue(int radix, int minLength) throws PersistException
Note: this method throws PersistException even for fetch failures since this method is called by insert operations. Insert operations can only throw a PersistException.
radix
- use 2 for binary, 10 for decimal, 16 for hex. Max is 36.minLength
- ensure string is at least this long (padded with zeros if
necessary) to ensure proper string sortPersistException
- for fetch/persist failure or if sequence is exhausted.boolean returnReservedValues() throws FetchException, PersistException
This method should be called during the shutdown process of a repository, although calling it does not invalidate this SequenceValueGenerator. If getNextValue is called again, it will reserve values again.
FetchException
PersistException
Copyright © 2006-2013 Amazon Technologies, Inc.. All Rights Reserved.