Public Member Functions | |
boolean | awaitTermination (long timeout, TimeUnit unit) throws InterruptedException |
DefaultScheduledExecutorService () | |
DefaultScheduledExecutorService (ExecutorService executorService) | |
DefaultScheduledExecutorService (ExecutorService executorService, ScheduledExecutorService scheduledExecutorService) | |
void | execute (Runnable command) |
boolean | isShutdown () |
boolean | isTerminated () |
ScheduledFuture<?> | schedule (Runnable command, long delay, TimeUnit unit) |
ScheduledFuture<?> | scheduleAtFixedRate (Runnable command, long initialDelay, long period, TimeUnit unit) |
ScheduledFuture<?> | scheduleWithFixedDelay (Runnable command, long initialDelay, long delay, TimeUnit unit) |
void | shutdown () |
List< Runnable > | shutdownNow () |
Future<?> | submit (Runnable task) |
Package Functions | |
public< T > List< Future< T > > | invokeAll (Collection<?extends Callable< T >> tasks) throws InterruptedException |
public< T > List< Future< T > > | invokeAll (Collection<?extends Callable< T >> tasks, long timeout, TimeUnit unit) throws InterruptedException |
public< T > T | invokeAny (Collection<?extends Callable< T >> tasks) throws InterruptedException, ExecutionException |
public< T > T | invokeAny (Collection<?extends Callable< T >> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException |
public< V > ScheduledFuture< V > | schedule (Callable< V > callable, long delay, TimeUnit unit) |
public< T > Future< T > | submit (Callable< T > task) |
public< T > Future< T > | submit (Runnable task, T result) |
Private Attributes | |
final ExecutorService | executorService |
final ScheduledExecutorService | scheduledExecutorService |
Static Private Attributes | |
static final int | CORE_POOL_SIZE = 11 |
This wraps a Executors#newCachedThreadPool() and a Executors#newScheduledThreadPool(int) to provide the functionality of both in a single ScheduledExecutorService. This is necessary since the ScheduledExecutorService uses an unbounded queue which makes it impossible to create an unlimited number of threads on demand (as explained in the ThreadPoolExecutor class javadoc.
Definition at line 45 of file DefaultScheduledExecutorService.java.
Definition at line 52 of file DefaultScheduledExecutorService.java.
org.ros.concurrent.DefaultScheduledExecutorService.DefaultScheduledExecutorService | ( | ExecutorService | executorService | ) | [inline] |
This instance will take over the lifecycle of the services.
executorService |
Definition at line 61 of file DefaultScheduledExecutorService.java.
org.ros.concurrent.DefaultScheduledExecutorService.DefaultScheduledExecutorService | ( | ExecutorService | executorService, |
ScheduledExecutorService | scheduledExecutorService | ||
) | [inline] |
This instance will take over the lifecycle of the services.
executorService | |
scheduledExecutorService |
Definition at line 71 of file DefaultScheduledExecutorService.java.
boolean org.ros.concurrent.DefaultScheduledExecutorService.awaitTermination | ( | long | timeout, |
TimeUnit | unit | ||
) | throws InterruptedException [inline] |
First calls awaitTermination(long, TimeUnit) on the wrapped ExecutorService and then awaitTermination(long, TimeUnit) on the wrapped ScheduledExecutorService.
true
false
Definition at line 110 of file DefaultScheduledExecutorService.java.
void org.ros.concurrent.DefaultScheduledExecutorService.execute | ( | Runnable | command | ) | [inline] |
Definition at line 157 of file DefaultScheduledExecutorService.java.
public<T> List<Future<T> > org.ros.concurrent.DefaultScheduledExecutorService.invokeAll | ( | Collection<?extends Callable< T >> | tasks | ) | throws InterruptedException [inline, package] |
Definition at line 133 of file DefaultScheduledExecutorService.java.
public<T> List<Future<T> > org.ros.concurrent.DefaultScheduledExecutorService.invokeAll | ( | Collection<?extends Callable< T >> | tasks, |
long | timeout, | ||
TimeUnit | unit | ||
) | throws InterruptedException [inline, package] |
Definition at line 139 of file DefaultScheduledExecutorService.java.
public<T> T org.ros.concurrent.DefaultScheduledExecutorService.invokeAny | ( | Collection<?extends Callable< T >> | tasks | ) | throws InterruptedException, ExecutionException [inline, package] |
Definition at line 145 of file DefaultScheduledExecutorService.java.
public<T> T org.ros.concurrent.DefaultScheduledExecutorService.invokeAny | ( | Collection<?extends Callable< T >> | tasks, |
long | timeout, | ||
TimeUnit | unit | ||
) | throws InterruptedException, ExecutionException, TimeoutException [inline, package] |
Definition at line 151 of file DefaultScheduledExecutorService.java.
boolean org.ros.concurrent.DefaultScheduledExecutorService.isShutdown | ( | ) | [inline] |
Definition at line 92 of file DefaultScheduledExecutorService.java.
boolean org.ros.concurrent.DefaultScheduledExecutorService.isTerminated | ( | ) | [inline] |
Definition at line 97 of file DefaultScheduledExecutorService.java.
ScheduledFuture<?> org.ros.concurrent.DefaultScheduledExecutorService.schedule | ( | Runnable | command, |
long | delay, | ||
TimeUnit | unit | ||
) | [inline] |
Definition at line 162 of file DefaultScheduledExecutorService.java.
public<V> ScheduledFuture<V> org.ros.concurrent.DefaultScheduledExecutorService.schedule | ( | Callable< V > | callable, |
long | delay, | ||
TimeUnit | unit | ||
) | [inline, package] |
Definition at line 167 of file DefaultScheduledExecutorService.java.
ScheduledFuture<?> org.ros.concurrent.DefaultScheduledExecutorService.scheduleAtFixedRate | ( | Runnable | command, |
long | initialDelay, | ||
long | period, | ||
TimeUnit | unit | ||
) | [inline] |
Definition at line 172 of file DefaultScheduledExecutorService.java.
ScheduledFuture<?> org.ros.concurrent.DefaultScheduledExecutorService.scheduleWithFixedDelay | ( | Runnable | command, |
long | initialDelay, | ||
long | delay, | ||
TimeUnit | unit | ||
) | [inline] |
Definition at line 178 of file DefaultScheduledExecutorService.java.
void org.ros.concurrent.DefaultScheduledExecutorService.shutdown | ( | ) | [inline] |
Definition at line 78 of file DefaultScheduledExecutorService.java.
List<Runnable> org.ros.concurrent.DefaultScheduledExecutorService.shutdownNow | ( | ) | [inline] |
Definition at line 84 of file DefaultScheduledExecutorService.java.
public<T> Future<T> org.ros.concurrent.DefaultScheduledExecutorService.submit | ( | Callable< T > | task | ) | [inline, package] |
Definition at line 118 of file DefaultScheduledExecutorService.java.
public<T> Future<T> org.ros.concurrent.DefaultScheduledExecutorService.submit | ( | Runnable | task, |
T | result | ||
) | [inline, package] |
Definition at line 123 of file DefaultScheduledExecutorService.java.
Future<?> org.ros.concurrent.DefaultScheduledExecutorService.submit | ( | Runnable | task | ) | [inline] |
Definition at line 128 of file DefaultScheduledExecutorService.java.
final int org.ros.concurrent.DefaultScheduledExecutorService.CORE_POOL_SIZE = 11 [static, private] |
Definition at line 47 of file DefaultScheduledExecutorService.java.
final ExecutorService org.ros.concurrent.DefaultScheduledExecutorService.executorService [private] |
Definition at line 49 of file DefaultScheduledExecutorService.java.
final ScheduledExecutorService org.ros.concurrent.DefaultScheduledExecutorService.scheduledExecutorService [private] |
Definition at line 50 of file DefaultScheduledExecutorService.java.