public final class LeaderFollowerNIOStrategy extends AbstractIOStrategy
IOStrategy, which executes Processors in a current threads, and
resumes selector thread logic in separate thread.ENABLE_INTEREST_LIFECYCLE_LISTENER| Modifier and Type | Method and Description |
|---|---|
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 LeaderFollowerNIOStrategy |
getInstance() |
createDefaultWorkerPoolConfig, executeIoEvent, fireIOEvent, getThreadPoolFor, isReadWritepublic static LeaderFollowerNIOStrategy getInstance()
public boolean executeIoEvent(Connection connection, IOEvent ioEvent, boolean isIoEventEnabled) throws IOException
IOStrategySelectorRunner 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
strategyisIoEventEnabled - 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.Copyright © 2017–2019 Oracle Corporation. All rights reserved.