com.ibm.ia.common

Class BaseDelay

  • java.lang.Object
    • com.ibm.ia.common.BaseDelay
  • All Implemented Interfaces:
    com.ibm.ia.common.impl.IDelayed, java.lang.Comparable<java.util.concurrent.Delayed>, java.util.concurrent.Delayed


    public abstract class BaseDelay
    extends java.lang.Object
    implements com.ibm.ia.common.impl.IDelayed
    • Constructor Summary

      Constructors 
      Modifier Constructor and Description
      protected BaseDelay() 
      protected BaseDelay(long millis) 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      int compareTo(java.util.concurrent.Delayed o) 
      boolean equals(java.lang.Object obj) 
      long getDelay(java.util.concurrent.TimeUnit unit) 
      long getOriginalDelayMillis() 
      int hashCode() 
      void setDelay(long delay)
      Set the remaining delay associated with this object, in milliseconds.
      void setDelay(java.util.concurrent.TimeUnit unit, long delay)
      Set the remaining delay associated with this object, in the given time unit.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BaseDelay

        protected BaseDelay()
      • BaseDelay

        protected BaseDelay(long millis)
    • Method Detail

      • getOriginalDelayMillis

        public long getOriginalDelayMillis()
        Specified by:
        getOriginalDelayMillis in interface com.ibm.ia.common.impl.IDelayed
        Returns:
        the time that the delay is expected to trigger, in milliseconds from epoch
      • getDelay

        public long getDelay(java.util.concurrent.TimeUnit unit)
        Specified by:
        getDelay in interface java.util.concurrent.Delayed
      • compareTo

        public int compareTo(java.util.concurrent.Delayed o)
        Specified by:
        compareTo in interface java.lang.Comparable<java.util.concurrent.Delayed>
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • setDelay

        public void setDelay(java.util.concurrent.TimeUnit unit,
                    long delay)
        Description copied from interface: com.ibm.ia.common.impl.IDelayed
        Set the remaining delay associated with this object, in the given time unit.
        Specified by:
        setDelay in interface com.ibm.ia.common.impl.IDelayed
        Parameters:
        unit - the time unit
        delay - the remaining delay; zero or negative values indicate that the delay has already elapsed
      • setDelay

        public void setDelay(long delay)
        Description copied from interface: com.ibm.ia.common.impl.IDelayed
        Set the remaining delay associated with this object, in milliseconds.
        Specified by:
        setDelay in interface com.ibm.ia.common.impl.IDelayed
        Parameters:
        delay - the remaining delay in milliseconds; zero or negative values indicate that the delay has already elapsed

© Copyright IBM 2017