|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
org.schmant.run.ManualTaskDependency
public class ManualTaskDependency
This is a task dependency that is handled manually. Calling
setCompleted()
satisfies the dependency.
Constructor Summary | |
---|---|
ManualTaskDependency()
|
Method Summary | |
---|---|
Observable |
getDependencyObservable()
Observable that will fire with the dependency as argument when all dependencies are satisfied. |
Lock |
getSatisfiedStateLock()
Get the Lock that protects the dependency's satisfied
property. |
boolean |
isSatisfied()
Is this dependency satisfied? |
void |
setCompleted()
This satisfies the dependency. |
String |
toString()
|
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ManualTaskDependency()
Method Detail |
---|
public void setCompleted()
public Observable getDependencyObservable()
TaskDependency
Implementation note: The thread firing an event must own the satisfied state lock on the task dependency object.
getDependencyObservable
in interface TaskDependency
Observable
to observe.public boolean isSatisfied()
TaskDependency
Implementation note: This method should be protected by the same
lock that can be retrieved by calling TaskDependency.getSatisfiedStateLock()
.
isSatisfied
in interface TaskDependency
true
if the dependency is satisfied.public Lock getSatisfiedStateLock()
TaskDependency
Lock
that protects the dependency's satisfied
property. This lock must be locked before the dependency's satisfied
state can be update.
An external class can lock this to ensure that the satisfied state is not updated while it holds the lock.
getSatisfiedStateLock
in interface TaskDependency
TaskDependency.isSatisfied()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |