javadoc.com.google.common.util.concurrent.ForwardingExecutorService.html Maven / Gradle / Ivy
The newest version!
ForwardingExecutorService (Guava: Google Core Libraries for Java 11.0.1 API)
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
com.google.common.util.concurrent
Class ForwardingExecutorService
java.lang.Object
com.google.common.collect.ForwardingObject
com.google.common.util.concurrent.ForwardingExecutorService
- All Implemented Interfaces:
- Executor, ExecutorService
- Direct Known Subclasses:
- ForwardingListeningExecutorService
public abstract class ForwardingExecutorService
- extends ForwardingObject
- implements ExecutorService
An executor service which forwards all its method calls to another executor service. Subclasses should override one or more methods to modify the behavior of the backing executor service as desired per the decorator pattern.
- Since:
- 10.0
- Author:
- Kurt Alfred Kluever
Constructor Summary | |
---|---|
protected |
ForwardingExecutorService()
Constructor for use by subclasses. |
Method Summary | ||
---|---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit)
|
|
protected abstract ExecutorService |
delegate()
Returns the backing delegate instance that methods are forwarded to. |
|
void |
execute(Runnable command)
|
|
|
invokeAll(Collection<? extends Callable<T>> tasks)
|
|
|
invokeAll(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit)
|
|
|
invokeAny(Collection<? extends Callable<T>> tasks)
|
|
|
invokeAny(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit)
|
|
boolean |
isShutdown()
|
|
boolean |
isTerminated()
|
|
void |
shutdown()
|
|
List<Runnable> |
shutdownNow()
|
|
|
submit(Callable<T> task)
|
|
Future<?> |
submit(Runnable task)
|
|
|
submit(Runnable task,
T result)
|
Methods inherited from class com.google.common.collect.ForwardingObject |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
ForwardingExecutorService
protected ForwardingExecutorService()
- Constructor for use by subclasses.
Method Detail |
---|
delegate
protected abstract ExecutorService delegate()
- Description copied from class:
ForwardingObject
- Returns the backing delegate instance that methods are forwarded to.
Abstract subclasses generally override this method with an abstract method
that has a more specific return type, such as
ForwardingSet.delegate()
. Concrete subclasses override this method to supply the instance being decorated.- Specified by:
delegate
in classForwardingObject
awaitTermination
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
- Specified by:
awaitTermination
in interfaceExecutorService
- Throws:
InterruptedException
invokeAll
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException
- Specified by:
invokeAll
in interfaceExecutorService
- Throws:
InterruptedException
invokeAll
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException
- Specified by:
invokeAll
in interfaceExecutorService
- Throws:
InterruptedException
invokeAny
public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException
- Specified by:
invokeAny
in interfaceExecutorService
invokeAny
public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
- Specified by:
invokeAny
in interfaceExecutorService
isShutdown
public boolean isShutdown()
- Specified by:
isShutdown
in interfaceExecutorService
isTerminated
public boolean isTerminated()
- Specified by:
isTerminated
in interfaceExecutorService
shutdown
public void shutdown()
- Specified by:
shutdown
in interfaceExecutorService
shutdownNow
public List<Runnable> shutdownNow()
- Specified by:
shutdownNow
in interfaceExecutorService
execute
public void execute(Runnable command)
submit
public <T> Future<T> submit(Callable<T> task)
- Specified by:
submit
in interfaceExecutorService
submit
public Future<?> submit(Runnable task)
- Specified by:
submit
in interfaceExecutorService
submit
public <T> Future<T> submit(Runnable task, T result)
- Specified by:
submit
in interfaceExecutorService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2010-2012. All Rights Reserved.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy