public void reportCompletion ( NodeT completed ) { completed . setPreparer ( true ) ; String dependency = completed . key ( ) ; for ( String dependentKey : nodeTable . get ( dependency ) . dependentKeys ( ) ) { DAGNode < DataT , NodeT > dependent = nodeTable . get ( dependentKey ) ; dependent . lock ( ) . lock ( ) ; try { dependent . onSuccessfulResolution ( dependency ) ; if ( dependent . hasAllResolved ( ) ) { queue . add ( dependent . key ( ) ) ; } } finally { dependent . lock ( ) . unlock ( ) ; } } }
Reports that a node is resolved hence other nodes depends on it can consume it .