public interface IOStrategy extends WorkerThreadPoolConfigProducer
Runnable
task will be run: in current thread, worker thread.
strategy can make any other processing decisions.Modifier and Type | Method and Description |
---|---|
boolean |
executeIoEvent(Connection connection,
IOEvent ioEvent)
The
SelectorRunner will invoke this
method to allow the strategy implementation to decide how the
IOEvent will be handled. |
boolean |
executeIoEvent(Connection connection,
IOEvent ioEvent,
boolean isIoEventEnabled)
The
SelectorRunner will invoke this
method to allow the strategy implementation to decide how the
IOEvent will be handled. |
Executor |
getThreadPoolFor(Connection connection,
IOEvent ioEvent)
Returns an
Executor to be used to run given ioEvent
processing for the given connection. |
createDefaultWorkerPoolConfig
boolean executeIoEvent(Connection connection, IOEvent ioEvent) throws IOException
SelectorRunner
will invoke this
method to allow the strategy implementation to decide how the
IOEvent
will be handled.connection
- the Connection
upon which the provided
IOEvent
occurred.ioEvent
- the IOEvent
that triggered execution of this
strategy
IOException
- if an error occurs processing the IOEvent
.boolean executeIoEvent(Connection connection, IOEvent ioEvent, boolean isIoEventEnabled) throws IOException
SelectorRunner
will invoke this
method to allow the strategy implementation to decide how the
IOEvent
will be handled.connection
- the Connection
upon which the provided
IOEvent
occurred.ioEvent
- the IOEvent
that triggered execution of this
strategy
isIoEventEnabled
- true if IOEvent is still enabled on the
Connection
, or false if IOEvent was preliminary disabled
or IOEvent is being simulated.IOException
- if an error occurs processing the IOEvent
.Executor getThreadPoolFor(Connection connection, IOEvent ioEvent)
Executor
to be used to run given ioEvent
processing for the given connection. A null value will
be returned if the ioEvent should be executed in the kernel thread.connection
- ioEvent
- Executor
to be used to run given ioEvent
processing for the given connectionCopyright © 2015 Oracle Corporation. All rights reserved.