DAGNode<DataT,NodeT> Class
- java.
lang. Object - com.
microsoft. azure. management. resources. fluentcore. dag. Node<DataT,NodeT> - com.
microsoft. azure. management. resources. fluentcore. dag. DAGNode<DataT,NodeT>
- com.
- com.
Type Parameters
- DataT
the type of the data stored in the node
- NodeT
the type of the node
public class DAGNode<DataT,NodeT>
extends Node<DataT,NodeT>
The type representing node in a DAGraph<DataT,NodeT>.
Constructor Summary
Constructor | Description |
---|---|
DAGNode(String key, DataT data) |
Creates a DAG node. |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
addDependency(String dependencyKey)
Mark the node identified by the given key as this node's dependency. |
void |
addDependent(String key)
Mark the node identified by the given key as dependent of this node. |
java.util.List<java.lang.String> | dependencyKeys() |
boolean | hasDependencies() |
void |
initialize()
Initialize the node so that traversal can be performed on the parent DAG. |
boolean | isPreparer() |
java.util.concurrent.locks.ReentrantLock | lock() |
protected void |
onFaultedResolution(String dependencyKey, Throwable throwable)
Reports a dependency of this node has been faulted. |
protected void |
onSuccessfulResolution(String dependencyKey)
Reports a dependency of this node has been successfully resolved. |
void |
removeDependency(String dependencyKey)
Remove the dependency node identified by the given key from the dependencies. |
void |
setPreparer(boolean isPreparer)
Mark or un-mark this node as preparer. |
Methods inherited from Node
Methods inherited from java.lang.Object
Constructor Details
DAGNode
public DAGNode(String key, DataT data)
Creates a DAG node.
Parameters:
Method Details
addDependency
public void addDependency(String dependencyKey)
Mark the node identified by the given key as this node's dependency.
Parameters:
addDependent
public void addDependent(String key)
Mark the node identified by the given key as dependent of this node.
Parameters:
dependencyKeys
public List
Returns:
hasDependencies
public boolean hasDependencies()
Returns:
initialize
public void initialize()
Initialize the node so that traversal can be performed on the parent DAG.
isPreparer
public boolean isPreparer()
Returns:
lock
public ReentrantLock lock()
Returns:
onFaultedResolution
protected void onFaultedResolution(String dependencyKey, Throwable throwable)
Reports a dependency of this node has been faulted.
Parameters:
onSuccessfulResolution
protected void onSuccessfulResolution(String dependencyKey)
Reports a dependency of this node has been successfully resolved.
Parameters:
removeDependency
public void removeDependency(String dependencyKey)
Remove the dependency node identified by the given key from the dependencies.
Parameters:
setPreparer
public void setPreparer(boolean isPreparer)
Mark or un-mark this node as preparer.
Parameters:
Applies to
Azure SDK for Java