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 |
|---|---|
| public void | awaitShutdown(TimeValue
wait time. waitTime)Blocks for the given period of time in milliseconds awaiting the completion of the reactor shutdown. |
| public void | close(CloseMode
How to close the receiver. closeMode)Redeclares org. |
| public IOReactorStatus | |
| public void |
| awaitShutdown | back to summary |
|---|---|
| public void awaitShutdown(TimeValue waitTime) throws InterruptedException Blocks for the given period of time in milliseconds awaiting the completion of the reactor shutdown.
| |
| close | back to summary |
|---|---|
| public void close(CloseMode closeMode) Redeclares org. Shuts down the I/O reactor either gracefully or immediately. During graceful shutdown individual I/O sessions should be informed about imminent termination and be given a grace period to complete the ongoing I/O sessions. During immediate shutdown all ongoing I/O sessions get aborted immediately.
| |
| getStatus | back to summary |
|---|---|
| public IOReactorStatus getStatus() Returns the current status of the reactor.
| |
| initiateShutdown | back to summary |
|---|---|
| public void initiateShutdown() Initiates shutdown of the reactor without blocking. The reactor is expected to terminate all active connections, to shut down itself and to release system resources it currently holds
| |