Class DAGNode<DataT,NodeT extends DAGNode<DataT,NodeT>>
java.lang.Object
com.microsoft.azure.management.resources.fluentcore.dag.Node<DataT,NodeT>
com.microsoft.azure.management.resources.fluentcore.dag.DAGNode<DataT,NodeT>
- Type Parameters:
DataT- the type of the data stored in the nodeNodeT- the type of the node
The type representing node in a
DAGraph.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDependency(String dependencyKey) Mark the node identified by the given key as this node's dependency.voidaddDependent(String key) Mark the node identified by the given key as dependent of this node.booleanvoidInitialize the node so that traversal can be performed on the parent DAG.booleanlock()protected voidonFaultedResolution(String dependencyKey, Throwable throwable) Reports a dependency of this node has been faulted.protected voidonSuccessfulResolution(String dependencyKey) Reports a dependency of this node has been successfully resolved.voidremoveDependency(String dependencyKey) Remove the dependency node identified by the given key from the dependencies.voidsetPreparer(boolean isPreparer) Mark or un-mark this node as preparer.Methods inherited from class com.microsoft.azure.management.resources.fluentcore.dag.Node
addChild, children, data, hasChildren, key, owner, removeChild, setOwner
-
Constructor Details
-
DAGNode
Creates a DAG node.- Parameters:
key- unique id of the nodedata- data to be stored in the node
-
-
Method Details
-
lock
- Returns:
- the lock to be used while performing thread safe operation on this node.
-
addDependent
Mark the node identified by the given key as dependent of this node.- Parameters:
key- the id of the dependent node
-
dependencyKeys
- Returns:
- a list of keys of nodes in
DAGraphthat this node depends on
-
addDependency
Mark the node identified by the given key as this node's dependency.- Parameters:
dependencyKey- the id of the dependency node
-
removeDependency
Remove the dependency node identified by the given key from the dependencies.- Parameters:
dependencyKey- the id of the dependency node
-
hasDependencies
public boolean hasDependencies()- Returns:
- true if this node has any dependency
-
setPreparer
public void setPreparer(boolean isPreparer) Mark or un-mark this node as preparer.- Parameters:
isPreparer- true if this node needs to be marked as preparer, false otherwise.
-
isPreparer
public boolean isPreparer()- Returns:
- true if this node is marked as preparer
-
initialize
public void initialize()Initialize the node so that traversal can be performed on the parent DAG. -
onSuccessfulResolution
Reports a dependency of this node has been successfully resolved.- Parameters:
dependencyKey- the id of the dependency node
-
onFaultedResolution
Reports a dependency of this node has been faulted.- Parameters:
dependencyKey- the id of the dependency nodethrowable- the reason for unsuccessful resolution
-