public class

ExecutorPool

extends Object
implements ExecutorService
java.lang.Object
   ↳ com.davidluoye.support.thread.ExecutorPool

Summary

Public Constructors
ExecutorPool(int size)
ExecutorPool(int size, String name)
Public Methods
boolean awaitTermination(long timeout, TimeUnit unit)
void execute(Runnable command)
final ExecutorService getThreadPool()
<T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
<T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
<T> T invokeAny(Collection<? extends Callable<T>> tasks)
<T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
boolean isShutdown()
boolean isTerminated()
void shutdown()
List<Runnable> shutdownNow()
Future<?> submit(Runnable task)
<T> Future<T> submit(Callable<T> task)
<T> Future<T> submit(Runnable task, T result)
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.util.concurrent.Executor
From interface java.util.concurrent.ExecutorService

Public Constructors

public ExecutorPool (int size)

public ExecutorPool (int size, String name)

Public Methods

public boolean awaitTermination (long timeout, TimeUnit unit)

Throws
InterruptedException

public void execute (Runnable command)

public final ExecutorService getThreadPool ()

public List<Future<T>> invokeAll (Collection<? extends Callable<T>> tasks)

Throws
InterruptedException

public List<Future<T>> invokeAll (Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)

Throws
InterruptedException

public T invokeAny (Collection<? extends Callable<T>> tasks)

Throws
ExecutionException
InterruptedException

public T invokeAny (Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)

Throws
ExecutionException
InterruptedException
TimeoutException

public boolean isShutdown ()

public boolean isTerminated ()

public void shutdown ()

public List<Runnable> shutdownNow ()

public Future<?> submit (Runnable task)

public Future<T> submit (Callable<T> task)

public Future<T> submit (Runnable task, T result)