Class DbIdGenerator

  • All Implemented Interfaces:

    public class DbIdGenerator
    extends java.lang.Object
    implements IdGenerator
    Tom Baeyens
    • Field Detail

      • idBlockSize

        protected int idBlockSize
      • nextId

        protected long nextId
      • lastId

        protected long lastId
    • Constructor Detail

      • DbIdGenerator

        public DbIdGenerator()
    • Method Detail

      • getNextId

        public java.lang.String getNextId()
        Specified by:
        getNextId in interface IdGenerator
      • getNewBlock

        protected void getNewBlock()
      • getIdBlockSize

        public int getIdBlockSize()
      • setIdBlockSize

        public void setIdBlockSize​(int idBlockSize)
      • setCommandExecutor

        public void setCommandExecutor​(CommandExecutor commandExecutor)
      • reset

        public void reset()
        Reset inner state so that the generator fetches a new block of IDs from the database when the next ID generation request is received.