Class ReleasedIdHolder

  • All Implemented Interfaces:
    IdHolder

    public class ReleasedIdHolder
    extends java.lang.Object
    implements IdHolder
    • Constructor Detail

      • ReleasedIdHolder

        public ReleasedIdHolder​(IdUtils idUtils,
                                long timeDelaySec)
    • Method Detail

      • allocateId

        public java.util.Optional<java.lang.Long> allocateId()
        Specified by:
        allocateId in interface IdHolder
      • addId

        public void addId​(long id)
        Specified by:
        addId in interface IdHolder
      • isIdAvailable

        public boolean isIdAvailable​(long curTimeSec)
        Specified by:
        isIdAvailable in interface IdHolder
      • getTimeDelaySec

        public long getTimeDelaySec()
      • setAvailableIdCount

        public void setAvailableIdCount​(long availableIdCount)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object