Class TcpConx.TcpDeadline

  • All Implemented Interfaces:
    Deadline
    Enclosing class:
    TcpConx

    protected class TcpConx.TcpDeadline
    extends java.lang.Object
    implements Deadline
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected TcpDeadline()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getDeadline​(long now)
      Implementing objects communicate their timing requirements and trigger timed operations using this method.
      • Methods inherited from class java.lang.Object

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

      • TcpDeadline

        protected TcpDeadline()
    • Method Detail

      • getDeadline

        public long getDeadline​(long now)
        Description copied from interface: Deadline
        Implementing objects communicate their timing requirements and trigger timed operations using this method. The object creator must have infrastructure to call this method after creation, then repeatedly as close to the requested timestamps as practical. Infrastructure is allowed to call this method early to re-evaluate the next timestamp requirement. Implementors must check the supplied 'now' timestamp to verify that a timed operation is appropriate. Implementations may make no assumptions about the thread environment or object synchronization.
        Specified by:
        getDeadline in interface Deadline
        Parameters:
        now - System.nanotime() to be used in the calculations.
        Returns:
        The absolute System.nanoTime() of the next event needed by the implementation. Return Long.MAX_VALUE if no further events are required.