Class ManualIoEventLoop.BlockingIoHandlerContext

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) long maxBlockingNanos  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canBlock()
      Returns true if blocking for IO is allowed or if we should try to do a non-blocking request for IO to be ready.
      long deadlineNanos()
      Returns the absolute point in time at which the next closest scheduled task should run or -1 if nothing is scheduled to run.
      long delayNanos​(long currentTimeNanos)
      Returns the amount of time left until the scheduled task with the closest deadline should run.
      • Methods inherited from class java.lang.Object

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

      • maxBlockingNanos

        long maxBlockingNanos
    • Constructor Detail

      • BlockingIoHandlerContext

        private BlockingIoHandlerContext()
    • Method Detail

      • canBlock

        public boolean canBlock()
        Description copied from interface: IoHandlerContext
        Returns true if blocking for IO is allowed or if we should try to do a non-blocking request for IO to be ready.
        Specified by:
        canBlock in interface IoHandlerContext
        Returns:
        true if allowed, false otherwise.
      • delayNanos

        public long delayNanos​(long currentTimeNanos)
        Description copied from interface: IoHandlerContext
        Returns the amount of time left until the scheduled task with the closest deadline should run.
        Specified by:
        delayNanos in interface IoHandlerContext
        Parameters:
        currentTimeNanos - the current nanos.
        Returns:
        nanos
      • deadlineNanos

        public long deadlineNanos()
        Description copied from interface: IoHandlerContext
        Returns the absolute point in time at which the next closest scheduled task should run or -1 if nothing is scheduled to run.
        Specified by:
        deadlineNanos in interface IoHandlerContext
        Returns:
        deadline.