public interface IOReactor
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 |
execute(IOEventDispatch eventDispatch)
Starts the reactor and initiates the dispatch of I/O event notifications
to the given
IOEventDispatch . |
IOReactorStatus |
getStatus()
Returns the current status of the reactor.
|
void |
shutdown()
Initiates shutdown of the reactor and blocks for a default period of
time waiting for the reactor to terminate all active connections, to shut
down itself and to release system resources it currently holds.
|
void |
shutdown(long waitMs)
Initiates shutdown of the reactor and blocks approximately for the given
period of time in milliseconds waiting for the reactor to terminate all
active connections, to shut down itself and to release system resources
it currently holds.
|
IOReactorStatus getStatus()
void execute(IOEventDispatch eventDispatch) throws IOException
IOEventDispatch
.eventDispatch
- the I/O event dispatch.IOException
- in case of an I/O error.void shutdown(long waitMs) throws IOException
waitMs
- wait time in milliseconds.IOException
- in case of an I/O error.void shutdown() throws IOException
IOException
- in case of an I/O error.Copyright © 2010 - 2020 Adobe. All Rights Reserved