ConnectionInitiator Internally
this I/O reactor distributes newly created I/O session equally across multiple
I/O worker threads for a more optimal resource utilization and a better
I/O performance. Usually it is recommended to have one worker I/O reactor
per physical CPU core.
| Modifier and Type | Field and Description |
|---|---|
| private final MultiCoreIOReactor | |
| private static final ThreadFactory | |
| private final int | |
| private final SingleCoreIOReactor[] | |
| private final IOWorkers. |
| Access | Constructor and Description |
|---|---|
| public | DefaultConnectingIOReactor(final IOEventHandlerFactory eventHandlerFactory, final IOReactorConfig ioReactorConfig, final ThreadFactory threadFactory, final Decorator<IOSession> ioSessionDecorator, final Callback<Exception> exceptionCallback, final IOSessionListener sessionListener, final Callback<IOSession> sessionShutdownCallback)
|
| public | DefaultConnectingIOReactor(final IOEventHandlerFactory eventHandlerFactory, final IOReactorConfig config, final Callback<IOSession> sessionShutdownCallback)
|
| public | DefaultConnectingIOReactor(final IOEventHandlerFactory eventHandlerFactory)
Creates an instance of DefaultConnectingIOReactor with default configuration. |
| Modifier and Type | Method and Description |
|---|---|
| public void | awaitShutdown(final TimeValue
wait time. waitTime)Implements org. |
| public void | close(final CloseMode
How to close the receiver. closeMode)Implements org. |
| public void | close()
Implements java. |
| public IOReactorStatus | getStatus()
Implements org. |
| pack-priv IOWorkers. | getWorkerSelector()
Implements abstract org. |
| public void | initiateShutdown()
Implements org. |
| public void |
| ioReactor | back to summary |
|---|---|
| private final MultiCoreIOReactor ioReactor | |
| THREAD_FACTORY | back to summary |
|---|---|
| private static final ThreadFactory THREAD_FACTORY | |
| workerCount | back to summary |
|---|---|
| private final int workerCount | |
| workers | back to summary |
|---|---|
| private final SingleCoreIOReactor[] workers | |
| workerSelector | back to summary |
|---|---|
| private final IOWorkers. | |
| DefaultConnectingIOReactor | back to summary |
|---|---|
| public DefaultConnectingIOReactor(final IOEventHandlerFactory eventHandlerFactory, final IOReactorConfig ioReactorConfig, final ThreadFactory threadFactory, final Decorator<IOSession> ioSessionDecorator, final Callback<Exception> exceptionCallback, final IOSessionListener sessionListener, final Callback<IOSession> sessionShutdownCallback) | |
| DefaultConnectingIOReactor | back to summary |
|---|---|
| public DefaultConnectingIOReactor(final IOEventHandlerFactory eventHandlerFactory, final IOReactorConfig config, final Callback<IOSession> sessionShutdownCallback) | |
| DefaultConnectingIOReactor | back to summary |
|---|---|
| public DefaultConnectingIOReactor(final IOEventHandlerFactory eventHandlerFactory) Creates an instance of DefaultConnectingIOReactor with default configuration.
| |
| awaitShutdown | back to summary |
|---|---|
| public void awaitShutdown(final TimeValue waitTime) throws InterruptedException Implements org. Doc from org. Blocks for the given period of time in milliseconds awaiting the completion of the reactor shutdown. | |
| close | back to summary |
|---|---|
| public void close(final CloseMode closeMode) Implements org. Doc from 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.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| getStatus | back to summary |
|---|---|
| public IOReactorStatus getStatus() Implements org. Doc from org. Returns the current status of the reactor.
| |
| getWorkerSelector | back to summary |
|---|---|
| pack-priv IOWorkers. Implements abstract org.
| |
| initiateShutdown | back to summary |
|---|---|
| public void initiateShutdown() Implements org. Doc from org. 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
| |
| start | back to summary |
|---|---|
| public void start() Implements org. Doc from org. Starts I/O reactor.
| |