Class ExecutionPool.Pulse

  • All Implemented Interfaces:
    java.lang.Comparable<java.util.concurrent.Delayed>, java.lang.Runnable, java.util.concurrent.Delayed
    Direct Known Subclasses:
    CacheLine
    Enclosing class:
    ExecutionPool

    public abstract static class ExecutionPool.Pulse
    extends java.lang.Object
    implements java.util.concurrent.Delayed, java.lang.Runnable
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Pulse​(long delayNanos)  
      protected Pulse​(long loadTimeNanos, long delayNanos)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(java.util.concurrent.Delayed other)  
      boolean equals​(java.lang.Object other)  
      long getDelay​(java.util.concurrent.TimeUnit unit)  
      long getExpireTimeNanos()  
      long getLoadTimeNanos()  
      int hashCode()  
      long timeDiff​(ExecutionPool.Pulse other)
      Calculates the difference between this.expireTimeNanos and other.expireTimeNanos
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Runnable

        run
    • Field Detail

      • expireTimeNanos

        protected final long expireTimeNanos
      • loadTimeNanos

        protected final long loadTimeNanos
    • Constructor Detail

      • Pulse

        protected Pulse​(long delayNanos)
      • Pulse

        protected Pulse​(long loadTimeNanos,
                        long delayNanos)
    • Method Detail

      • getLoadTimeNanos

        public long getLoadTimeNanos()
      • getExpireTimeNanos

        public long getExpireTimeNanos()
      • getDelay

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

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

        public final boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public long timeDiff​(ExecutionPool.Pulse other)
        Calculates the difference between this.expireTimeNanos and other.expireTimeNanos
        Parameters:
        other - used to calculate the difference
        Returns:
        the time difference of the two instance's expireTimeNanos