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 @interface
Some callers cannot get the normalNAME_ACCOUNTS
sequence injected because some injected fields are not available at injection time.static @interface
Some callers cannot get the normalNAME_GROUPS
sequence injected because some injected fields are not available at injection time.static enum
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionint
current()
Returns the next available sequence value.int
Returns the batch size that was used to initialize the sequence.int
last()
Returns the last sequence number that was assigned.int
next()
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 acount
of next available values.void
storeNew
(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 acount
of 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.
-