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, wait
executeIoEvent
protected static final IOEventLifeCycleListener ENABLE_INTEREST_LIFECYCLE_LISTENER
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
.public Executor getThreadPoolFor(Connection connection, IOEvent ioEvent)
IOStrategy
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.getThreadPoolFor
in interface IOStrategy
Executor
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 © 2014 Oracle Corporation. All Rights Reserved.