public class ManagedExecutorServiceImpl extends AbstractManagedExecutorService
AbstractManagedExecutorService
.AbstractManagedExecutorService.RejectPolicy
Modifier and Type | Field and Description |
---|---|
protected ManagedExecutorServiceAdapter |
adapter |
protected ManagedThreadPoolExecutor |
threadPoolExecutor |
contextService, contextSetupProvider, contextualCallback, longRunningTasks, managedThreadFactory, name, rejectPolicy
Constructor and Description |
---|
ManagedExecutorServiceImpl(String name,
ManagedThreadFactoryImpl managedThreadFactory,
long hungTaskThreshold,
boolean longRunningTasks,
int corePoolSize,
int maxPoolSize,
long keepAliveTime,
TimeUnit keepAliveTimeUnit,
long threadLifeTime,
ContextServiceImpl contextService,
AbstractManagedExecutorService.RejectPolicy rejectPolicy,
BlockingQueue<Runnable> queue) |
ManagedExecutorServiceImpl(String name,
ManagedThreadFactoryImpl managedThreadFactory,
long hungTaskThreshold,
boolean longRunningTasks,
int corePoolSize,
int maxPoolSize,
long keepAliveTime,
TimeUnit keepAliveTimeUnit,
long threadLifeTime,
int queueCapacity,
ContextServiceImpl contextService,
AbstractManagedExecutorService.RejectPolicy rejectPolicy) |
Modifier and Type | Method and Description |
---|---|
void |
execute(Runnable command) |
ManagedExecutorServiceAdapter |
getAdapter()
Returns an adapter for ManagedExecutorService instance which has its
life cycle operations disabled.
|
long |
getCompletedTaskCount()
Returns the approximate total number of tasks that have
completed execution.
|
javax.enterprise.concurrent.ManagedExecutorService |
getExecutorForTaskListener()
Returns the ManagedExecutorService instance that is used for passing
as the executor argument of ManagedTaskListener calls
|
protected ManagedFutureTask |
getNewTaskFor(Callable callable)
newTaskFor from super class java.util.concurrent.AbstractExecutorService
is protected access.
|
protected <V> ManagedFutureTask<V> |
getNewTaskFor(Runnable r,
V result)
newTaskFor from super class java.util.concurrent.AbstractExecutorService
is protected access.
|
long |
getTaskCount()
Returns the approximate total number of tasks that have ever been
scheduled for execution.
|
protected ExecutorService |
getThreadPoolExecutor() |
awaitTermination, doInvokeAny, executeManagedFutureTask, getContextService, getContextSetupProvider, getHungThreads, getManagedThreadFactory, getName, getObjectName, getRejectPolicy, getThreads, invokeAll, invokeAll, invokeAny, invokeAny, isContextualCallback, isEventProvider, isLongRunningTasks, isShutdown, isStateManageable, isStatisticsProvider, isTerminated, newTaskFor, newTaskFor, shutdown, shutdownNow, submit, submit, submit
protected final ManagedThreadPoolExecutor threadPoolExecutor
protected final ManagedExecutorServiceAdapter adapter
public ManagedExecutorServiceImpl(String name, ManagedThreadFactoryImpl managedThreadFactory, long hungTaskThreshold, boolean longRunningTasks, int corePoolSize, int maxPoolSize, long keepAliveTime, TimeUnit keepAliveTimeUnit, long threadLifeTime, ContextServiceImpl contextService, AbstractManagedExecutorService.RejectPolicy rejectPolicy, BlockingQueue<Runnable> queue)
public ManagedExecutorServiceImpl(String name, ManagedThreadFactoryImpl managedThreadFactory, long hungTaskThreshold, boolean longRunningTasks, int corePoolSize, int maxPoolSize, long keepAliveTime, TimeUnit keepAliveTimeUnit, long threadLifeTime, int queueCapacity, ContextServiceImpl contextService, AbstractManagedExecutorService.RejectPolicy rejectPolicy)
public void execute(Runnable command)
execute
in interface Executor
execute
in class AbstractManagedExecutorService
public ManagedExecutorServiceAdapter getAdapter()
protected ExecutorService getThreadPoolExecutor()
getThreadPoolExecutor
in class AbstractManagedExecutorService
public javax.enterprise.concurrent.ManagedExecutorService getExecutorForTaskListener()
AbstractManagedExecutorService
getExecutorForTaskListener
in class AbstractManagedExecutorService
protected <V> ManagedFutureTask<V> getNewTaskFor(Runnable r, V result)
AbstractManagedExecutorService
getNewTaskFor
in class AbstractManagedExecutorService
protected ManagedFutureTask getNewTaskFor(Callable callable)
AbstractManagedExecutorService
getNewTaskFor
in class AbstractManagedExecutorService
public long getTaskCount()
AbstractManagedExecutorService
getTaskCount
in class AbstractManagedExecutorService
public long getCompletedTaskCount()
AbstractManagedExecutorService
getCompletedTaskCount
in class AbstractManagedExecutorService
Copyright © 1996-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.