Class ManualIoEventLoop.BlockingIoHandlerContext
java.lang.Object
io.netty.channel.ManualIoEventLoop.BlockingIoHandlerContext
- All Implemented Interfaces:
IoHandlerContext
- Enclosing class:
ManualIoEventLoop
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanBlock()Returnstrueif blocking for IO is allowed or if we should try to do a non-blocking request for IO to be ready.longReturns 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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IoHandlerContext
reportActiveIoTime, shouldReportActiveIoTime
-
Field Details
-
maxBlockingNanos
long maxBlockingNanos
-
-
Constructor Details
-
BlockingIoHandlerContext
private BlockingIoHandlerContext()
-
-
Method Details
-
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.
-