Class AbstractUIDSequencer

    • Field Detail

    • Constructor Detail

      • AbstractUIDSequencer

        public AbstractUIDSequencer()
    • Method Detail

      • getNext

        public int getNext​(String key)
        Description copied from interface: UIDSequencer
        For the given key returns the incremented UID which is also stored in the same sequence entry. This is a "one time use" function for a document.
        Specified by:
        getNext in interface UIDSequencer
      • 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
      • initSequence

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