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 by
DelegatingSecurityContextExecutorService
.- Author:
- poirigui
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptionboolean
awaitTermination
(long l, TimeUnit timeUnit) The executor this is delegating for.invokeAll
(Collection<? extends Callable<T>> collection) 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
boolean
void
shutdown()
Future
<?> <T> Future
<T> <T> Future
<T> protected abstract <T> Callable
<T> Methods inherited from class ubic.gemma.core.util.concurrent.AbstractDelegatingExecutor
execute, wrap
-
Constructor Details
-
AbstractDelegatingExecutorService
-
-
Method Details
-
wrap
-
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
- Specified by:
shutdownNow
in interfaceExecutorService
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdown
in interfaceExecutorService
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminated
in interfaceExecutorService
-
awaitTermination
- Specified by:
awaitTermination
in interfaceExecutorService
- Throws:
InterruptedException
-
submit
- Specified by:
submit
in interfaceExecutorService
-
submit
- Specified by:
submit
in interfaceExecutorService
-
submit
- 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
-