API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util.concurrent. ExecutorService View Source
Author(s)
Doug Lea
Since
1.5
Version
Serial
Hierarchy
 Executor
      ExecutorService
Subinterfaces
Description
public interface ExecutorService
  An Executor that provides methods to manage termination and methods that can produce a Future for tracking progress of one or more asynchronous tasks.
See also:   
Methods
Hide/Show inherited methods
public boolean awaitTermination (long timeout, TimeUnit unit) throws InterruptedException
  Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.
public List<Future< T>> invokeAll (Collection<Callable> tasks) throws InterruptedException
  Executes the given tasks, returning a list of Futures holding their status and results when all complete.
public List<Future< T>> invokeAll (Collection<Callable> tasks, long timeout, TimeUnit unit) throws InterruptedException
  Executes the given tasks, returning a list of Futures holding their status and results when all complete or the timeout expires, whichever happens first.
public T invokeAny (Collection<Callable> tasks) throws InterruptedException ExecutionException
  Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do.
public T invokeAny (Collection<Callable> tasks, long timeout, TimeUnit unit) throws InterruptedException ExecutionException TimeoutException
  Executes the given tasks, returning the result of one that has completed successfully (i.e., without throwing an exception), if any do before the given timeout elapses.
public boolean isShutdown ()
  Returns true if this executor has been shut down.
public boolean isTerminated ()
  Returns true if all tasks have completed following shut down.
public void shutdown ()
  Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted.
public List<Runnable> shutdownNow ()
  Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution.
public Future< T> submit (Callable< T> task)
  Submits a value-returning task for execution and returns a Future representing the pending results of the task.
public Future<Object> submit (Runnable task)
  Submits a Runnable task for execution and returns a Future representing that task.
public Future< T> submit (Runnable task, T result)
  Submits a Runnable task for execution and returns a Future representing that task.
Fields
Hide/Show inherited fields
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar