Class ControllableQueue.DelayNode<T>

  • Type Parameters:
    T - the type of the value
    Enclosing class:
    ControllableQueue<T>

    public static class ControllableQueue.DelayNode<T>
    extends java.lang.Object
    A delay node in delta queue which records the value and the total delay (which is the original delay plus the past time).
    • Constructor Detail

      • DelayNode

        public DelayNode​(T value,
                         long millis)
        Constructs a new ControllableQueue.DelayNode.
        Parameters:
        value - a value
        millis - delay time in milliseconds
    • Method Detail

      • getValue

        public T getValue()
        Returns:
        the value
      • getDelay

        public long getDelay()
        Returns:
        the delay in milliseconds
      • setDelay

        public void setDelay​(long delay)
        Sets the delay.
        Parameters:
        delay - the delay in milliseconds