Package com.google.gerrit.server
Interface Sequence
- All Known Implementing Classes:
RepoSequence
public interface Sequence
An incrementing sequence that's used to assign new unique numbers for change, account and group
IDs.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic @interfaceSome callers cannot get the normalNAME_ACCOUNTSsequence injected because some injected fields are not available at injection time.static @interfaceSome callers cannot get the normalNAME_GROUPSsequence injected because some injected fields are not available at injection time.static enum -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintcurrent()Returns the next available sequence value.intReturns the batch size that was used to initialize the sequence.intlast()Returns the last sequence number that was assigned.intnext()Returns the next available sequence value and increments the sequence for the next call.com.google.common.collect.ImmutableList<Integer>next(int count) Similar tonext()but returns acountof next available values.voidstoreNew(int value)
-
Field Details
-
NAME_ACCOUNTS
- See Also:
-
NAME_GROUPS
- See Also:
-
NAME_CHANGES
- See Also:
-
-
Method Details
-
next
int next()Returns the next available sequence value and increments the sequence for the next call. -
next
Similar tonext()but returns acountof next available values. -
current
int current()Returns the next available sequence value. -
last
int last()Returns the last sequence number that was assigned. -
storeNew
void storeNew(int value) -
getBatchSize
int getBatchSize()Returns the batch size that was used to initialize the sequence.
-