T
- public class Forker<T> extends Object
doWhen(Collection, Object, Runnable)
. The collection is
the list of dependencies, the object is the target, and the runnable is run
to update the target. The runnable will only run when all its dependencies
have ran their associated runnable.Constructor and Description |
---|
Forker()
Constructor
|
Forker(Executor executor)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
cancel(long ms)
Cancel the forker.
|
void |
doWhen(Collection<? extends T> dependencies,
T target,
Runnable runnable)
Schedule a job for execution when the dependencies are done of target are
done.
|
int |
getCount() |
void |
start(long ms) |
void |
sync(long ms) |
public Forker(Executor executor)
executor
- public Forker()
public void doWhen(Collection<? extends T> dependencies, T target, Runnable runnable)
dependencies
- the dependencies that must have runtarget
- the target, is removed from all the dependencies when it
ranrunnable
- the runnable to runpublic void start(long ms) throws InterruptedException
InterruptedException
public void sync(long ms) throws InterruptedException
InterruptedException
public void cancel(long ms) throws InterruptedException
InterruptedException
public int getCount()
Copyright © 2021 aQute SARL. All rights reserved.