public class ScheduledThreadPool extends java.lang.Object implements java.util.concurrent.ScheduledExecutorService, EnvironmentListener, java.io.Serializable
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit)
Blocks until the tasks complete.
|
void |
environmentBind(EnvironmentClassLoader loader)
Called when the environment bind phase
|
void |
environmentConfigure(EnvironmentClassLoader loader)
Called when the environment config phase
|
void |
environmentStart(EnvironmentClassLoader loader)
Called when the environment starts.
|
void |
environmentStop(EnvironmentClassLoader loader)
Called when the environment stops.
|
void |
execute(java.lang.Runnable command)
Launches a thread to execute a command.
|
static ScheduledThreadPool |
getLocal() |
java.util.Timer |
getTimer()
Returns the Timer for this pool.
|
java.util.List |
invokeAll(java.util.Collection tasks)
Invokes a set of tasks.
|
java.util.List |
invokeAll(java.util.Collection tasks,
long timeout,
java.util.concurrent.TimeUnit unit)
Invokes a set of tasks.
|
java.lang.Object |
invokeAny(java.util.Collection tasks)
Invokes a set of tasks.
|
java.lang.Object |
invokeAny(java.util.Collection tasks,
long timeout,
java.util.concurrent.TimeUnit unit)
Invokes a set of tasks.
|
boolean |
isShutdown()
Return true if the executor is shut down.
|
boolean |
isTerminated()
Return true if the executor has completed shutting down.
|
<V> java.util.concurrent.ScheduledFuture<V> |
schedule(java.util.concurrent.Callable<V> callable,
long delay,
java.util.concurrent.TimeUnit unit)
Schedules a future task.
|
java.util.concurrent.ScheduledFuture<?> |
schedule(java.lang.Runnable command,
long delay,
java.util.concurrent.TimeUnit unit)
Schedules a future task.
|
java.util.concurrent.ScheduledFuture<?> |
scheduleAtFixedRate(java.lang.Runnable command,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
Schedules a future task.
|
java.util.concurrent.ScheduledFuture<?> |
scheduleWithFixedDelay(java.lang.Runnable command,
long initialDelay,
long delay,
java.util.concurrent.TimeUnit unit)
Schedules with fixed delay
|
void |
shutdown()
Starts the shutdown.
|
java.util.List<java.lang.Runnable> |
shutdownNow()
Starts the shutdown.
|
<T> java.util.concurrent.Future<T> |
submit(java.util.concurrent.Callable<T> task)
Submits a task for execution.
|
java.util.concurrent.Future<?> |
submit(java.lang.Runnable command)
Submits a task for execution.
|
<T> java.util.concurrent.Future<T> |
submit(java.lang.Runnable task,
T result)
Submits a task for execution.
|
java.lang.String |
toString() |
java.lang.Object |
writeReplace()
Serialize to a webbeans handle
|
public static ScheduledThreadPool getLocal()
public void execute(java.lang.Runnable command)
execute in interface java.util.concurrent.Executorpublic boolean awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit)
awaitTermination in interface java.util.concurrent.ExecutorServicepublic java.util.List invokeAll(java.util.Collection tasks)
invokeAll in interface java.util.concurrent.ExecutorServicepublic java.util.List invokeAll(java.util.Collection tasks,
long timeout,
java.util.concurrent.TimeUnit unit)
invokeAll in interface java.util.concurrent.ExecutorServicepublic java.lang.Object invokeAny(java.util.Collection tasks)
invokeAny in interface java.util.concurrent.ExecutorServicepublic java.lang.Object invokeAny(java.util.Collection tasks,
long timeout,
java.util.concurrent.TimeUnit unit)
invokeAny in interface java.util.concurrent.ExecutorServicepublic boolean isShutdown()
isShutdown in interface java.util.concurrent.ExecutorServicepublic boolean isTerminated()
isTerminated in interface java.util.concurrent.ExecutorServicepublic void shutdown()
shutdown in interface java.util.concurrent.ExecutorServicepublic java.util.List<java.lang.Runnable> shutdownNow()
shutdownNow in interface java.util.concurrent.ExecutorServicepublic <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T> task)
submit in interface java.util.concurrent.ExecutorServicepublic java.util.concurrent.Future<?> submit(java.lang.Runnable command)
submit in interface java.util.concurrent.ExecutorServicepublic <T> java.util.concurrent.Future<T> submit(java.lang.Runnable task,
T result)
submit in interface java.util.concurrent.ExecutorServicepublic <V> java.util.concurrent.ScheduledFuture<V> schedule(java.util.concurrent.Callable<V> callable,
long delay,
java.util.concurrent.TimeUnit unit)
schedule in interface java.util.concurrent.ScheduledExecutorServicepublic java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable command,
long delay,
java.util.concurrent.TimeUnit unit)
schedule in interface java.util.concurrent.ScheduledExecutorServicepublic java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable command,
long initialDelay,
long period,
java.util.concurrent.TimeUnit unit)
scheduleAtFixedRate in interface java.util.concurrent.ScheduledExecutorServicepublic java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable command,
long initialDelay,
long delay,
java.util.concurrent.TimeUnit unit)
scheduleWithFixedDelay in interface java.util.concurrent.ScheduledExecutorServicepublic java.util.Timer getTimer()
public void environmentConfigure(EnvironmentClassLoader loader)
environmentConfigure in interface EnvironmentListenerpublic void environmentBind(EnvironmentClassLoader loader)
environmentBind in interface EnvironmentListenerpublic void environmentStart(EnvironmentClassLoader loader)
environmentStart in interface EnvironmentListenerpublic void environmentStop(EnvironmentClassLoader loader)
environmentStop in interface EnvironmentListenerpublic java.lang.Object writeReplace()
public java.lang.String toString()
toString in class java.lang.Object