public final class SameThreadIOStrategy extends AbstractIOStrategy
IOStrategy
, which executes Processor
s in a current thread.ENABLE_INTEREST_PROCESSING_HANDLER
Modifier and Type | Method and Description |
---|---|
ThreadPoolConfig |
createDefaultWorkerPoolConfig(Transport transport) |
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. |
static SameThreadIOStrategy |
getInstance() |
executeIoEvent, fireIOEvent, getWorkerThreadPool, isExecuteInWorkerThread, isReadWrite
public static SameThreadIOStrategy getInstance()
public boolean executeIoEvent(Connection connection, IOEvent ioEvent, boolean isIoEventEnabled) throws IOException
IOStrategy
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
.public ThreadPoolConfig createDefaultWorkerPoolConfig(Transport transport)
createDefaultWorkerPoolConfig
in interface WorkerThreadPoolConfigProducer
createDefaultWorkerPoolConfig
in class AbstractIOStrategy
Copyright © 2014 Oracle Corporation. All rights reserved.