Class BatchingIDGenerator

  • All Implemented Interfaces:
    IDGenerator

    public final class BatchingIDGenerator
    extends Object
    implements IDGenerator
    An ID generator that allocates a batch of IDs of size checkpointSize and records the ID in the journal only when starting a new batch.
    See Also:
    IDGenerator
    • Constructor Detail

      • BatchingIDGenerator

        public BatchingIDGenerator​(long start,
                                   long checkpointSize,
                                   StorageManager storageManager)
    • Method Detail

      • persistCurrentID

        public void persistCurrentID()
      • cleanup

        public void cleanup()
        A method to cleanup old records after started
      • loadState

        public void loadState​(long journalID,
                              ActiveMQBuffer buffer)
      • forceNextID

        public void forceNextID​(long nextID)
      • createIDEncodingSupport

        public static EncodingSupport createIDEncodingSupport​(long id)