public abstract class AbstractIoServiceFactory extends AbstractCloseable implements IoServiceFactory, FactoryManagerHolder, ExecutorServiceCarrier
AbstractCloseable.State
closeFuture, lock, state
log
CLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT
Modifier | Constructor and Description |
---|---|
protected |
AbstractIoServiceFactory(FactoryManager factoryManager,
ExecutorService executorService,
boolean shutdownOnExit) |
Modifier and Type | Method and Description |
---|---|
protected void |
doCloseImmediately()
doCloseImmediately is called once and only once
with state == Immediate
|
ExecutorService |
getExecutorService() |
FactoryManager |
getFactoryManager() |
static int |
getNioWorkers(FactoryManager manager) |
boolean |
isShutdownOnExit() |
addCloseFutureListener, builder, close, doCloseGracefully, isClosed, isClosing, preClose, removeCloseFutureListener
getSimplifiedLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createAcceptor, createConnector
addCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListener
protected AbstractIoServiceFactory(FactoryManager factoryManager, ExecutorService executorService, boolean shutdownOnExit)
public final FactoryManager getFactoryManager()
getFactoryManager
in interface FactoryManagerHolder
FactoryManager
public final ExecutorService getExecutorService()
getExecutorService
in interface ExecutorServiceCarrier
ExecutorService
to usepublic final boolean isShutdownOnExit()
isShutdownOnExit
in interface ExecutorServiceCarrier
true
then the ExecutorService.shutdownNow()
will be called (unless it is an internally allocated service which is always
closed)protected void doCloseImmediately()
AbstractCloseable
doCloseImmediately is called once and only once with state == Immediate
Overriding methods should always call the base implementation. It may be called concurrently while preClose() or doCloseGracefully is executing
doCloseImmediately
in class AbstractCloseable
public static int getNioWorkers(FactoryManager manager)
Copyright © 2008–2019 The Apache Software Foundation. All rights reserved.