public interface IOReactor extends ModalCloseable
The IOReactor interface represents an abstract object implementing the Reactor pattern.
I/O reactors usually employ a small number of dispatch threads (often as few as one) to dispatch I/O event notifications to a much greater number (often as many as several thousands) of I/O sessions or connections. It is generally recommended to have one dispatch thread per CPU core.
Modifier and Type | Method and Description |
---|---|
void |
awaitShutdown(TimeValue waitTime)
Blocks for the given period of time in milliseconds awaiting
the completion of the reactor shutdown.
|
void |
close(CloseMode closeMode)
Shuts down the I/O reactor either gracefully or immediately.
|
IOReactorStatus |
getStatus()
Returns the current status of the reactor.
|
void |
initiateShutdown()
Initiates shutdown of the reactor without blocking.
|
void close(CloseMode closeMode)
close
in interface ModalCloseable
closeMode
- How to close the receiver.IOReactorStatus getStatus()
void initiateShutdown()
void awaitShutdown(TimeValue waitTime) throws InterruptedException
waitTime
- wait time.InterruptedException
- Thrown when a thread is waiting, sleeping, or otherwise occupied,
and the thread is interrupted, either before or during the activity.Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.