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, shutdownNow
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
awaitTermination, invokeAll, invokeAll, invokeAny, invokeAny, isShutdown, isTerminated, shutdown, shutdownNow
protected 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.ManagedScheduledExecutorService
public <V> ScheduledFuture<V> schedule(Callable<V> callable, javax.enterprise.concurrent.Trigger trigger)
schedule
in interface javax.enterprise.concurrent.ManagedScheduledExecutorService
public ScheduledFuture<?> schedule(Runnable command, long delay, TimeUnit unit)
schedule
in interface ScheduledExecutorService
public <V> ScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit unit)
schedule
in interface ScheduledExecutorService
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit)
scheduleAtFixedRate
in interface ScheduledExecutorService
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit)
scheduleWithFixedDelay
in interface ScheduledExecutorService
public void execute(Runnable command)
execute
in interface Executor
execute
in class AbstractManagedExecutorService
public Future<?> submit(Runnable task)
submit
in interface ExecutorService
submit
in class AbstractManagedExecutorService
public <T> Future<T> submit(Runnable task, T result)
submit
in interface ExecutorService
submit
in class AbstractManagedExecutorService
public <T> Future<T> submit(Callable<T> task)
submit
in interface ExecutorService
submit
in class AbstractManagedExecutorService
protected ExecutorService getThreadPoolExecutor()
getThreadPoolExecutor
in class AbstractManagedExecutorService
public ManagedScheduledExecutorServiceAdapter getAdapter()
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 <V> ManagedFutureTask<V> getNewTaskFor(Callable<V> callable)
AbstractManagedExecutorService
getNewTaskFor
in class AbstractManagedExecutorService
protected void executeManagedFutureTask(ManagedFutureTask task)
AbstractManagedExecutorService
executeManagedFutureTask
in class AbstractManagedExecutorService
task
- The ManagedFutureTask to be runpublic 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.