public class DBSequence extends Object
Modifier and Type | Method and Description |
---|---|
BSONObject |
fetch(int fetchNum)
Fetch a bulk of continuous values.
|
long |
getCurrentValue()
Get the current value of sequence.
|
String |
getName() |
long |
getNextValue()
Get the next value of sequence.
|
void |
restart(long startValue)
Restart sequence from the given value.
|
void |
setAttributes(BSONObject options)
Alter the sequence with the specified options.
|
void |
setCurrentValue(long value)
Set the current value to sequence.
|
public BSONObject fetch(int fetchNum)
fetchNum
- The number of values to be fetchedpublic long getCurrentValue()
public String getName()
public long getNextValue()
public void restart(long startValue)
startValue
- The start value.public void setAttributes(BSONObject options)
options
- The options specified by user, details as bellow:
public void setCurrentValue(long value)
value
- The expected current valueCopyright © 2023. All rights reserved.