final class EPJExecutorImpl extends java.util.concurrent.ScheduledThreadPoolExecutor implements EPJRefeshableExecutor, org.eclipse.jetty.util.component.LifeCycle.Listener
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
Modifier and Type | Field and Description |
---|---|
private int |
awaitTerminationInMillis |
private EPJLifeCycle |
lifeCycleDelegate |
private static org.slf4j.Logger |
log |
Constructor and Description |
---|
EPJExecutorImpl(ExecutorConfiguration config) |
Modifier and Type | Method and Description |
---|---|
void |
addLifeCycleListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener) |
ExecutorStats |
getServiceStats() |
boolean |
isFailed() |
boolean |
isRunning() |
boolean |
isStarted() |
boolean |
isStarting() |
boolean |
isStopped() |
boolean |
isStopping() |
void |
lifeCycleFailure(org.eclipse.jetty.util.component.LifeCycle event,
java.lang.Throwable cause) |
void |
lifeCycleStarted(org.eclipse.jetty.util.component.LifeCycle event) |
void |
lifeCycleStarting(org.eclipse.jetty.util.component.LifeCycle event) |
void |
lifeCycleStopped(org.eclipse.jetty.util.component.LifeCycle event) |
void |
lifeCycleStopping(org.eclipse.jetty.util.component.LifeCycle event) |
void |
removeLifeCycleListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener) |
void |
setLifeCycle(org.eclipse.jetty.util.component.LifeCycle applicationLifeCycle) |
void |
start() |
void |
stop() |
decorateTask, decorateTask, execute, getContinueExistingPeriodicTasksAfterShutdownPolicy, getExecuteExistingDelayedTasksAfterShutdownPolicy, getQueue, getRemoveOnCancelPolicy, schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay, setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy, setRemoveOnCancelPolicy, shutdown, shutdownNow, submit, submit, submit
afterExecute, allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, beforeExecute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, terminated, toString
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
setCorePoolSize, setMaximumPoolSize
schedule, schedule, scheduleAtFixedRate, scheduleWithFixedDelay
private static final org.slf4j.Logger log
private final int awaitTerminationInMillis
private final EPJLifeCycle lifeCycleDelegate
@Inject public EPJExecutorImpl(ExecutorConfiguration config)
@Inject(optional=true) public void setLifeCycle(org.eclipse.jetty.util.component.LifeCycle applicationLifeCycle)
public ExecutorStats getServiceStats()
getServiceStats
in interface EPJExecutor
public void lifeCycleStopped(org.eclipse.jetty.util.component.LifeCycle event)
lifeCycleStopped
in interface org.eclipse.jetty.util.component.LifeCycle.Listener
public void lifeCycleStarting(org.eclipse.jetty.util.component.LifeCycle event)
lifeCycleStarting
in interface org.eclipse.jetty.util.component.LifeCycle.Listener
public void lifeCycleStarted(org.eclipse.jetty.util.component.LifeCycle event)
lifeCycleStarted
in interface org.eclipse.jetty.util.component.LifeCycle.Listener
public void lifeCycleFailure(org.eclipse.jetty.util.component.LifeCycle event, java.lang.Throwable cause)
lifeCycleFailure
in interface org.eclipse.jetty.util.component.LifeCycle.Listener
public void lifeCycleStopping(org.eclipse.jetty.util.component.LifeCycle event)
lifeCycleStopping
in interface org.eclipse.jetty.util.component.LifeCycle.Listener
public void start() throws java.lang.Exception
start
in interface org.eclipse.jetty.util.component.LifeCycle
java.lang.Exception
public void stop() throws java.lang.Exception
stop
in interface org.eclipse.jetty.util.component.LifeCycle
java.lang.Exception
public boolean isRunning()
isRunning
in interface org.eclipse.jetty.util.component.LifeCycle
public boolean isStarted()
isStarted
in interface org.eclipse.jetty.util.component.LifeCycle
public boolean isStarting()
isStarting
in interface org.eclipse.jetty.util.component.LifeCycle
public boolean isStopping()
isStopping
in interface org.eclipse.jetty.util.component.LifeCycle
public boolean isStopped()
isStopped
in interface org.eclipse.jetty.util.component.LifeCycle
public boolean isFailed()
isFailed
in interface org.eclipse.jetty.util.component.LifeCycle
public void addLifeCycleListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener)
addLifeCycleListener
in interface org.eclipse.jetty.util.component.LifeCycle
public void removeLifeCycleListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener)
removeLifeCycleListener
in interface org.eclipse.jetty.util.component.LifeCycle