|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jvnet.hk2.component.concurrent.WorkManager
@Deprecated public class WorkManager
Simple helper for managing work sent to a foreign executor service.
Has similarities to Fork and Join. The implementation is designed such that Tasks-1 are sent to the executor service for possibly another thread to handle. The last task is executed by the caller thread so that all threads are attempted to be fully utilized for processing including the caller's thread.
Nested Class Summary | |
---|---|
static class |
WorkManager.ExecutionException
Deprecated. |
Constructor Summary | |
---|---|
WorkManager(Executor exec)
Deprecated. |
|
WorkManager(Executor exec,
int tasksToDo)
Deprecated. |
Method Summary | ||
---|---|---|
void |
awaitCompletion()
Deprecated. |
|
void |
awaitCompletion(long timeout,
TimeUnit unit)
Deprecated. |
|
protected void |
completed(org.jvnet.hk2.component.concurrent.WorkManager.Watcher<?> watcher,
Exception e)
Deprecated. |
|
void |
execute(Runnable task)
Deprecated. |
|
void |
executeAll(Collection<Runnable> tasks)
Deprecated. |
|
int |
getWorkInProgressCount()
Deprecated. |
|
|
submit(Callable<V> task)
Deprecated. |
|
|
submitAll(Collection<Callable<V>> tasks)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WorkManager(Executor exec)
public WorkManager(Executor exec, int tasksToDo)
Method Detail |
---|
public int getWorkInProgressCount()
public void awaitCompletion()
public void awaitCompletion(long timeout, TimeUnit unit) throws TimeoutException
TimeoutException
protected void completed(org.jvnet.hk2.component.concurrent.WorkManager.Watcher<?> watcher, Exception e)
public <V> Collection<Future<V>> submitAll(Collection<Callable<V>> tasks)
public void executeAll(Collection<Runnable> tasks)
public <V> Future<V> submit(Callable<V> task)
public void execute(Runnable task)
execute
in interface Executor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |