Class RedisUIDSequencer

    • Field Detail

      • log

        protected static final Log log
      • namespace

        protected String namespace
    • Constructor Detail

      • RedisUIDSequencer

        public RedisUIDSequencer()
    • Method Detail

      • init

        public void init()
        Description copied from interface: UIDSequencer
        Init Sequencer
      • dispose

        public void dispose()
        Description copied from interface: UIDSequencer
        Cleanup callback
      • initSequence

        public void initSequence​(String key,
                                 long id)
        Description copied from interface: UIDSequencer
        Initializes the sequencer with the given key to at least the given long id.

        A sequence can only be incremented, so if its current id is greater than the given id the sequence won't be decremented to reach the given id.

        Specified by:
        initSequence in interface UIDSequencer
        Overrides:
        initSequence in class AbstractUIDSequencer
      • getNextBlock

        public List<Long> getNextBlock​(String key,
                                       int blockSize)
        Description copied from interface: UIDSequencer
        Returns a block containing blockSize sequences.