public abstract class AbstractIOStrategy extends Object implements IOStrategy
Modifier and Type | Field and Description |
---|---|
protected static IOEventProcessingHandler |
ENABLE_INTEREST_PROCESSING_HANDLER |
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,
IOEventProcessingHandler ph,
Logger logger) |
protected static Executor |
getWorkerThreadPool(Connection c) |
protected static boolean |
isExecuteInWorkerThread(IOEvent ioEvent) |
protected static boolean |
isReadWrite(IOEvent ioEvent) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
executeIoEvent
protected static final IOEventProcessingHandler ENABLE_INTEREST_PROCESSING_HANDLER
public ThreadPoolConfig createDefaultWorkerPoolConfig(Transport transport)
createDefaultWorkerPoolConfig
in interface WorkerThreadPoolConfigProducer
public final boolean executeIoEvent(Connection connection, IOEvent ioEvent) throws IOException
IOStrategy
SelectorRunner
will invoke this
method to allow the strategy implementation to decide how the
IOEvent
will be handled.executeIoEvent
in interface IOStrategy
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
.protected static boolean isReadWrite(IOEvent ioEvent)
protected static boolean isExecuteInWorkerThread(IOEvent ioEvent)
protected static Executor getWorkerThreadPool(Connection c)
protected static void fireIOEvent(Connection connection, IOEvent ioEvent, IOEventProcessingHandler ph, Logger logger)
Copyright © 2014 Oracle Corporation. All rights reserved.