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 Classes
    Modifier and Type
    Interface
    Description
    static @interface 
    Some callers cannot get the normal NAME_ACCOUNTS sequence injected because some injected fields are not available at injection time.
    static @interface 
    Some callers cannot get the normal NAME_GROUPS sequence injected because some injected fields are not available at injection time.
    static enum 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the next available sequence value.
    int
    Returns the batch size that was used to initialize the sequence.
    int
    Returns the last sequence number that was assigned.
    int
    Returns the next available sequence value and increments the sequence for the next call.
    com.google.common.collect.ImmutableList<Integer>
    next(int count)
    Similar to next() but returns a count of next available values.
    void
    storeNew(int value)
    Stores a new value to be returned on the next calls for next() or current().
  • Field Details

  • Method Details

    • next

      int next()
      Returns the next available sequence value and increments the sequence for the next call.
    • next

      com.google.common.collect.ImmutableList<Integer> next(int count)
      Similar to next() but returns a count 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)
      Stores a new value to be returned on the next calls for next() or current().
    • getBatchSize

      int getBatchSize()
      Returns the batch size that was used to initialize the sequence.