Class IntegerIdSequence
- java.lang.Object
-
- jetbrains.buildServer.serverSide.db.IntegerIdSequence
-
- All Implemented Interfaces:
IdSequence<Integer>,NumericIdSequence<Integer>
public final class IntegerIdSequence extends Object implements NumericIdSequence<Integer>
- Author:
- Leonid Bushuev from JetBrains
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegerlastOne()Checks the last used identifier.IntegernextOne()Produces the new identifier.Interval<Integer>nextRange(int count)Produces and returns a range of identifiers.voidresetCounter()This method is for testing purposes only.
-
-
-
Method Detail
-
nextOne
@NotNull public Integer nextOne()
Description copied from interface:NumericIdSequenceProduces the new identifier.- Specified by:
nextOnein interfaceIdSequence<Integer>- Specified by:
nextOnein interfaceNumericIdSequence<Integer>- Returns:
- the new identifier.
-
nextRange
@NotNull public Interval<Integer> nextRange(int count)
Description copied from interface:NumericIdSequenceProduces and returns a range of identifiers.- Specified by:
nextRangein interfaceNumericIdSequence<Integer>- Parameters:
count- how many identifiers to produce.- Returns:
- a range of new identifiers.
-
lastOne
@NotNull public Integer lastOne()
Description copied from interface:NumericIdSequenceChecks the last used identifier.- Specified by:
lastOnein interfaceNumericIdSequence<Integer>- Returns:
- the last used value.
-
resetCounter
public void resetCounter()
This method is for testing purposes only. Never use this method!
-
-