public class WorkManager extends Object implements Executor
Modifier and Type | Class and Description |
---|---|
static class |
WorkManager.ExecutionException |
Constructor and Description |
---|
WorkManager(Executor exec) |
WorkManager(Executor exec,
int tasksToDo) |
Modifier and Type | Method and Description |
---|---|
void |
awaitCompletion() |
void |
awaitCompletion(long timeout,
TimeUnit unit) |
protected void |
completed(org.jvnet.hk2.config.WorkManager.Watcher<?> watcher,
Exception e) |
void |
execute(Runnable task) |
void |
executeAll(Collection<Runnable> tasks) |
int |
getWorkInProgressCount() |
<V> Future<V> |
submit(Callable<V> task) |
<V> Collection<Future<V>> |
submitAll(Collection<Callable<V>> tasks) |
public WorkManager(Executor exec)
public WorkManager(Executor exec, int tasksToDo)
public int getWorkInProgressCount()
public void awaitCompletion()
public void awaitCompletion(long timeout, TimeUnit unit) throws TimeoutException
TimeoutException
protected void completed(org.jvnet.hk2.config.WorkManager.Watcher<?> watcher, Exception e)
public <V> Collection<Future<V>> submitAll(Collection<Callable<V>> tasks)
public void executeAll(Collection<Runnable> tasks)
Copyright © 2009–2018 Oracle Corporation. All rights reserved.