DAGNode<DataT,NodeT,NodeT> Class
- java.
lang. Object - Node<DataT,NodeT,NodeT>
- com.
microsoft. azure. management. resources. fluentcore. dag. DAGNode<DataT,NodeT,NodeT>
- com.
Type Parameters
- DataT
the type of the data stored in the node
- NodeT
the type of the node
- NodeT
the type of the node
public class DAGNode<DataT,NodeT extends DAGNode<DataT,NodeT>> extends Node<DataT, NodeT>
The type representing node in a DAGraph<DataT,NodeT>.
Constructor Summary
Constructor | Description |
---|---|
DAGNode(final String key, final 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. |
List<String> | dependencyKeys() |
boolean | hasDependencies() |
void |
initialize()
Initialize the node so that traversal can be performed on the parent DAG. |
boolean | isPreparer() |
ReentrantLock | lock() |
void |
onFaultedResolution(String dependencyKey, Throwable throwable)
Reports a dependency of this node has been faulted. |
void |
onSuccessfulResolution(String dependencyKey)
Reports a dependency of this node has been successfully resolved. |
void |
setPreparer(boolean isPreparer)
Mark or un-mark this node as preparer. |
Inherited Members
Constructor Details
DAGNode
public DAGNode(final String key, final 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:
true
if this node has any dependency
initialize
public void initialize()
Initialize the node so that traversal can be performed on the parent DAG.
isPreparer
public boolean isPreparer()
Returns:
true
if this node is marked as preparer
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:
setPreparer
public void setPreparer(boolean isPreparer)
Mark or un-mark this node as preparer.
Parameters:
true
if this node needs to be marked as preparer, false
otherwise.
Applies to
Azure SDK for Java