Package ubic.gemma.cli.batch
Class AbstractDelegatingExecutorService
- java.lang.Object
-
- ubic.gemma.cli.batch.AbstractDelegatingExecutorService
-
- All Implemented Interfaces:
Executor,ExecutorService
- Direct Known Subclasses:
BatchTaskExecutorService
public abstract class AbstractDelegatingExecutorService extends Object implements ExecutorService
A delegating executor service inspired byDelegatingSecurityContextExecutorService.- Author:
- poirigui
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDelegatingExecutorService(ExecutorService delegate)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanawaitTermination(long l, TimeUnit timeUnit)voidexecute(Runnable runnable)<T> List<Future<T>>invokeAll(Collection<? extends Callable<T>> collection)<T> List<Future<T>>invokeAll(Collection<? extends Callable<T>> collection, long l, TimeUnit timeUnit)<T> TinvokeAny(Collection<? extends Callable<T>> collection)<T> TinvokeAny(Collection<? extends Callable<T>> collection, long l, TimeUnit timeUnit)booleanisShutdown()booleanisTerminated()voidshutdown()List<Runnable>shutdownNow()Future<?>submit(Runnable runnable)<T> Future<T>submit(Runnable runnable, T t)<T> Future<T>submit(Callable<T> callable)protected abstract Runnablewrap(Runnable runnable)protected abstract <T> Callable<T>wrap(Callable<T> callable)
-
-
-
Constructor Detail
-
AbstractDelegatingExecutorService
protected AbstractDelegatingExecutorService(ExecutorService delegate)
-
-
Method Detail
-
shutdown
public void shutdown()
- Specified by:
shutdownin interfaceExecutorService
-
shutdownNow
@Nonnull public List<Runnable> shutdownNow()
- Specified by:
shutdownNowin interfaceExecutorService
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdownin interfaceExecutorService
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminatedin interfaceExecutorService
-
awaitTermination
public boolean awaitTermination(long l, TimeUnit timeUnit) throws InterruptedException- Specified by:
awaitTerminationin interfaceExecutorService- Throws:
InterruptedException
-
submit
@Nonnull public <T> Future<T> submit(Callable<T> callable)
- Specified by:
submitin interfaceExecutorService
-
submit
@Nonnull public <T> Future<T> submit(Runnable runnable, T t)
- Specified by:
submitin interfaceExecutorService
-
submit
@Nonnull public Future<?> submit(Runnable runnable)
- Specified by:
submitin interfaceExecutorService
-
invokeAll
@Nonnull public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> collection) throws InterruptedException
- Specified by:
invokeAllin interfaceExecutorService- Throws:
InterruptedException
-
invokeAll
@Nonnull public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> collection, long l, TimeUnit timeUnit) throws InterruptedException
- Specified by:
invokeAllin interfaceExecutorService- Throws:
InterruptedException
-
invokeAny
@Nonnull public <T> T invokeAny(Collection<? extends Callable<T>> collection) throws InterruptedException, ExecutionException
- Specified by:
invokeAnyin interfaceExecutorService- Throws:
InterruptedExceptionExecutionException
-
invokeAny
public <T> T invokeAny(Collection<? extends Callable<T>> collection, long l, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
invokeAnyin interfaceExecutorService- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
-