Package io.netty.channel
Class ManualIoEventLoop.BlockingIoHandlerContext
- java.lang.Object
-
- io.netty.channel.ManualIoEventLoop.BlockingIoHandlerContext
-
- All Implemented Interfaces:
IoHandlerContext
- Enclosing class:
- ManualIoEventLoop
private class ManualIoEventLoop.BlockingIoHandlerContext extends java.lang.Object implements IoHandlerContext
-
-
Field Summary
Fields Modifier and Type Field Description (package private) longmaxBlockingNanos
-
Constructor Summary
Constructors Modifier Constructor Description privateBlockingIoHandlerContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanBlock()Returnstrueif blocking for IO is allowed or if we should try to do a non-blocking request for IO to be ready.longdeadlineNanos()Returns the absolute point in time at which the next closest scheduled task should run or-1if nothing is scheduled to run.longdelayNanos(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
-
Methods inherited from interface io.netty.channel.IoHandlerContext
reportActiveIoTime, shouldReportActiveIoTime
-
-
-
-
Method Detail
-
canBlock
public boolean canBlock()
Description copied from interface:IoHandlerContextReturnstrueif blocking for IO is allowed or if we should try to do a non-blocking request for IO to be ready.- Specified by:
canBlockin interfaceIoHandlerContext- Returns:
trueif allowed,falseotherwise.
-
delayNanos
public long delayNanos(long currentTimeNanos)
Description copied from interface:IoHandlerContextReturns the amount of time left until the scheduled task with the closest deadline should run.- Specified by:
delayNanosin interfaceIoHandlerContext- Parameters:
currentTimeNanos- the current nanos.- Returns:
- nanos
-
deadlineNanos
public long deadlineNanos()
Description copied from interface:IoHandlerContextReturns the absolute point in time at which the next closest scheduled task should run or-1if nothing is scheduled to run.- Specified by:
deadlineNanosin interfaceIoHandlerContext- Returns:
- deadline.
-
-