DAGNode<DataT,NodeT> Class
- java.
lang. Object - com.
azure. resourcemanager. resources. fluentcore. dag. Node<DataT,NodeT> - com.
azure. resourcemanager. 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. |
| List<String> |
dependencyKeys()
Gets a list of keys of nodes in DAGraph that this node depends on. |
| boolean |
hasDependencies()
Check whether this node has any dependency. |
| void |
initialize()
Initialize the node so that traversal can be performed on the parent DAG. |
| boolean |
isPreparer()
Check whether this node is marked as preparer. |
|
Reentrant |
lock()
Gets the lock to be used while performing thread safe operation on this node. |
| 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<String> dependencyKeys()
Gets a list of keys of nodes in DAGraph that this node depends on.
Returns:
hasDependencies
public boolean hasDependencies()
Check whether this node has any dependency.
Returns:
initialize
public void initialize()
Initialize the node so that traversal can be performed on the parent DAG.
isPreparer
public boolean isPreparer()
Check whether this node is marked as preparer.
Returns:
lock
public ReentrantLock lock()
Gets the lock to be used while performing thread safe operation on this node.
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: