Package ubic.gemma.core.util.concurrent
Class AbstractDelegatingExecutorService
- java.lang.Object
-
- ubic.gemma.core.util.concurrent.AbstractDelegatingExecutor
-
- ubic.gemma.core.util.concurrent.AbstractDelegatingExecutorService
-
- All Implemented Interfaces:
Executor
,ExecutorService
,DelegatingExecutor
,DelegatingExecutorService
- Direct Known Subclasses:
BatchTaskExecutorService
,DelegatingThreadContextExecutorService
,DelegatingThreadContextScheduledExecutorService
public abstract class AbstractDelegatingExecutorService extends AbstractDelegatingExecutor implements DelegatingExecutorService
A delegating executor service inspired byDelegatingSecurityContextExecutorService
.- Author:
- poirigui
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractDelegatingExecutorService(ExecutorService delegate)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
awaitTermination(long l, TimeUnit timeUnit)
ExecutorService
getDelegate()
The executor this is delegating for.<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> T
invokeAny(Collection<? extends Callable<T>> collection)
<T> T
invokeAny(Collection<? extends Callable<T>> collection, long l, TimeUnit timeUnit)
boolean
isShutdown()
boolean
isTerminated()
void
shutdown()
List<Runnable>
shutdownNow()
Future<?>
submit(Runnable runnable)
<T> Future<T>
submit(Runnable runnable, T t)
<T> Future<T>
submit(Callable<T> callable)
protected abstract <T> Callable<T>
wrap(Callable<T> callable)
-
Methods inherited from class ubic.gemma.core.util.concurrent.AbstractDelegatingExecutor
execute, wrap
-
-
-
-
Constructor Detail
-
AbstractDelegatingExecutorService
protected AbstractDelegatingExecutorService(ExecutorService delegate)
-
-
Method Detail
-
getDelegate
public ExecutorService getDelegate()
Description copied from interface:DelegatingExecutor
The executor this is delegating for.- Specified by:
getDelegate
in interfaceDelegatingExecutor
- Specified by:
getDelegate
in interfaceDelegatingExecutorService
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceExecutorService
-
shutdownNow
@Nonnull public List<Runnable> shutdownNow()
- Specified by:
shutdownNow
in interfaceExecutorService
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdown
in interfaceExecutorService
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminated
in interfaceExecutorService
-
awaitTermination
public boolean awaitTermination(long l, TimeUnit timeUnit) throws InterruptedException
- Specified by:
awaitTermination
in interfaceExecutorService
- Throws:
InterruptedException
-
submit
@Nonnull public <T> Future<T> submit(Callable<T> callable)
- Specified by:
submit
in interfaceExecutorService
-
submit
@Nonnull public <T> Future<T> submit(Runnable runnable, T t)
- Specified by:
submit
in interfaceExecutorService
-
submit
@Nonnull public Future<?> submit(Runnable runnable)
- Specified by:
submit
in interfaceExecutorService
-
invokeAll
@Nonnull public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> collection) throws InterruptedException
- Specified by:
invokeAll
in interfaceExecutorService
- Throws:
InterruptedException
-
invokeAll
@Nonnull public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> collection, long l, TimeUnit timeUnit) throws InterruptedException
- Specified by:
invokeAll
in interfaceExecutorService
- Throws:
InterruptedException
-
invokeAny
@Nonnull public <T> T invokeAny(Collection<? extends Callable<T>> collection) throws InterruptedException, ExecutionException
- Specified by:
invokeAny
in interfaceExecutorService
- Throws:
InterruptedException
ExecutionException
-
invokeAny
public <T> T invokeAny(Collection<? extends Callable<T>> collection, long l, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
invokeAny
in interfaceExecutorService
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
-