public abstract class AbstractIOStrategy extends Object implements IOStrategy
| Modifier and Type | Field and Description |
|---|---|
protected static IOEventLifeCycleListener |
ENABLE_INTEREST_LIFECYCLE_LISTENER |
| Constructor and Description |
|---|
AbstractIOStrategy() |
| Modifier and Type | Method and Description |
|---|---|
ThreadPoolConfig |
createDefaultWorkerPoolConfig(Transport transport) |
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. |
protected static void |
fireIOEvent(Connection connection,
IOEvent ioEvent,
IOEventLifeCycleListener listener,
Logger logger) |
Executor |
getThreadPoolFor(Connection connection,
IOEvent ioEvent)
Returns an
Executor to be used to run given ioEvent
processing for the given connection. |
protected static boolean |
isReadWrite(IOEvent ioEvent) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteIoEventprotected static final IOEventLifeCycleListener ENABLE_INTEREST_LIFECYCLE_LISTENER
public ThreadPoolConfig createDefaultWorkerPoolConfig(Transport transport)
createDefaultWorkerPoolConfig in interface WorkerThreadPoolConfigProducerpublic final boolean executeIoEvent(Connection connection, IOEvent ioEvent) throws IOException
IOStrategySelectorRunner will invoke this
method to allow the strategy implementation to decide how the
IOEvent will be handled.executeIoEvent in interface IOStrategyconnection - the Connection upon which the provided
IOEvent occurred.ioEvent - the IOEvent that triggered execution of this
strategyIOException - if an error occurs processing the IOEvent.public Executor getThreadPoolFor(Connection connection, IOEvent ioEvent)
IOStrategyExecutor 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.getThreadPoolFor in interface IOStrategyExecutor to be used to run given ioEvent
processing for the given connectionprotected static boolean isReadWrite(IOEvent ioEvent)
protected static void fireIOEvent(Connection connection, IOEvent ioEvent, IOEventLifeCycleListener listener, Logger logger)
Copyright © 2017–2019 Oracle Corporation. All rights reserved.