Package org.ros.concurrent
Class SharedScheduledExecutorService
java.lang.Object
org.ros.concurrent.SharedScheduledExecutorService
- All Implemented Interfaces:
Executor,ExecutorService,ScheduledExecutorService
A
ScheduledExecutorService which cannot be shut down. This can be
safely injected into instances which should not be in control of the
ExecutorService's lifecycle.- Author:
- khughes@google.com (Keith M. Hughes)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanawaitTermination(long timeout, TimeUnit unit) voidinvokeAll(Collection<? extends Callable<T>> tasks) invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) <T> TinvokeAny(Collection<? extends Callable<T>> tasks) <T> TinvokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) booleanboolean<V> ScheduledFuture<V>scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) voidshutdown()Future<?><T> Future<T><T> Future<T>
-
Constructor Details
-
SharedScheduledExecutorService
-
-
Method Details
-
awaitTermination
- Specified by:
awaitTerminationin interfaceExecutorService- Throws:
InterruptedException- See Also:
-
execute
-
invokeAll
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException - Specified by:
invokeAllin interfaceExecutorService- Throws:
InterruptedException- See Also:
-
invokeAll
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException - Specified by:
invokeAllin interfaceExecutorService- Throws:
InterruptedException- See Also:
-
invokeAny
public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
invokeAnyin interfaceExecutorService- Throws:
InterruptedExceptionExecutionExceptionTimeoutException- See Also:
-
invokeAny
public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException - Specified by:
invokeAnyin interfaceExecutorService- Throws:
InterruptedExceptionExecutionException- See Also:
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceExecutorService- See Also:
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceExecutorService- See Also:
-
schedule
- Specified by:
schedulein interfaceScheduledExecutorService- See Also:
-
schedule
- Specified by:
schedulein interfaceScheduledExecutorService- See Also:
-
scheduleAtFixedRate
public ScheduledFuture<?> scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit) - Specified by:
scheduleAtFixedRatein interfaceScheduledExecutorService- See Also:
-
scheduleWithFixedDelay
public ScheduledFuture<?> scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit) - Specified by:
scheduleWithFixedDelayin interfaceScheduledExecutorService- See Also:
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceExecutorService- See Also:
-
shutdownNow
- Specified by:
shutdownNowin interfaceExecutorService- See Also:
-
submit
- Specified by:
submitin interfaceExecutorService- See Also:
-
submit
- Specified by:
submitin interfaceExecutorService- See Also:
-
submit
- Specified by:
submitin interfaceExecutorService- See Also:
-