public class ManagedScheduledExecutorServiceImpl extends AbstractManagedExecutorService implements javax.enterprise.concurrent.ManagedScheduledExecutorService
AbstractManagedExecutorService.RejectPolicy| Modifier and Type | Field and Description |
|---|---|
protected ManagedScheduledExecutorServiceAdapter |
adapter |
protected ManagedScheduledThreadPoolExecutor |
threadPoolExecutor |
contextService, contextSetupProvider, contextualCallback, longRunningTasks, managedThreadFactory, name, rejectPolicy| Constructor and Description |
|---|
ManagedScheduledExecutorServiceImpl(String name,
ManagedThreadFactoryImpl managedThreadFactory,
long hungTaskThreshold,
boolean longRunningTasks,
int corePoolSize,
long keepAliveTime,
TimeUnit keepAliveTimeUnit,
long threadLifeTime,
ContextServiceImpl contextService,
AbstractManagedExecutorService.RejectPolicy rejectPolicy) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(Runnable command) |
protected void |
executeManagedFutureTask(ManagedFutureTask task)
Executes a ManagedFutureTask created by getNewTaskFor()
|
ManagedScheduledExecutorServiceAdapter |
getAdapter()
Returns an adapter for the ManagedScheduledExceutorService 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 <V> ManagedFutureTask<V> |
getNewTaskFor(Callable<V> 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() |
<V> ScheduledFuture<V> |
schedule(Callable<V> callable,
long delay,
TimeUnit unit) |
<V> ScheduledFuture<V> |
schedule(Callable<V> callable,
javax.enterprise.concurrent.Trigger trigger) |
ScheduledFuture<?> |
schedule(Runnable command,
long delay,
TimeUnit unit) |
ScheduledFuture<?> |
schedule(Runnable command,
javax.enterprise.concurrent.Trigger trigger) |
ScheduledFuture<?> |
scheduleAtFixedRate(Runnable command,
long initialDelay,
long period,
TimeUnit unit) |
ScheduledFuture<?> |
scheduleWithFixedDelay(Runnable command,
long initialDelay,
long delay,
TimeUnit unit) |
<T> Future<T> |
submit(Callable<T> task) |
Future<?> |
submit(Runnable task) |
<T> Future<T> |
submit(Runnable task,
T result) |
awaitTermination, doInvokeAny, getContextService, getContextSetupProvider, getHungThreads, getManagedThreadFactory, getName, getObjectName, getRejectPolicy, getThreads, invokeAll, invokeAll, invokeAny, invokeAny, isContextualCallback, isEventProvider, isLongRunningTasks, isShutdown, isStateManageable, isStatisticsProvider, isTerminated, newTaskFor, newTaskFor, shutdown, shutdownNowclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitawaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNowprotected ManagedScheduledThreadPoolExecutor threadPoolExecutor
protected final ManagedScheduledExecutorServiceAdapter adapter
public ManagedScheduledExecutorServiceImpl(String name, ManagedThreadFactoryImpl managedThreadFactory, long hungTaskThreshold, boolean longRunningTasks, int corePoolSize, long keepAliveTime, TimeUnit keepAliveTimeUnit, long threadLifeTime, ContextServiceImpl contextService, AbstractManagedExecutorService.RejectPolicy rejectPolicy)
public ScheduledFuture<?> schedule(Runnable command, javax.enterprise.concurrent.Trigger trigger)
schedule in interface javax.enterprise.concurrent.ManagedScheduledExecutorServicepublic <V> ScheduledFuture<V> schedule(Callable<V> callable, javax.enterprise.concurrent.Trigger trigger)
schedule in interface javax.enterprise.concurrent.ManagedScheduledExecutorServicepublic ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
schedule in interface ScheduledExecutorServicepublic <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
schedule in interface ScheduledExecutorServicepublic ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleAtFixedRate in interface ScheduledExecutorServicepublic ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
scheduleWithFixedDelay in interface ScheduledExecutorServicepublic void execute(Runnable command)
execute in interface Executorexecute in class AbstractManagedExecutorServicepublic Future<?> submit(Runnable task)
submit in interface ExecutorServicesubmit in class AbstractManagedExecutorServicepublic <T> Future<T> submit(Runnable task, T result)
submit in interface ExecutorServicesubmit in class AbstractManagedExecutorServicepublic <T> Future<T> submit(Callable<T> task)
submit in interface ExecutorServicesubmit in class AbstractManagedExecutorServiceprotected ExecutorService getThreadPoolExecutor()
getThreadPoolExecutor in class AbstractManagedExecutorServicepublic ManagedScheduledExecutorServiceAdapter getAdapter()
public javax.enterprise.concurrent.ManagedExecutorService getExecutorForTaskListener()
AbstractManagedExecutorServicegetExecutorForTaskListener in class AbstractManagedExecutorServiceprotected <V> ManagedFutureTask<V> getNewTaskFor(Runnable r, V result)
AbstractManagedExecutorServicegetNewTaskFor in class AbstractManagedExecutorServiceprotected <V> ManagedFutureTask<V> getNewTaskFor(Callable<V> callable)
AbstractManagedExecutorServicegetNewTaskFor in class AbstractManagedExecutorServiceprotected void executeManagedFutureTask(ManagedFutureTask task)
AbstractManagedExecutorServiceexecuteManagedFutureTask in class AbstractManagedExecutorServicetask - The ManagedFutureTask to be runpublic long getTaskCount()
AbstractManagedExecutorServicegetTaskCount in class AbstractManagedExecutorServicepublic long getCompletedTaskCount()
AbstractManagedExecutorServicegetCompletedTaskCount in class AbstractManagedExecutorServiceCopyright © 1996-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.