-
Notifications
You must be signed in to change notification settings - Fork 638
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Lehmann-Fabian <[email protected]> Signed-off-by: Lehmann_Fabian <[email protected]>
- Loading branch information
1 parent
1e38274
commit 21afb35
Showing
2 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,9 @@ import nextflow.script.params.OutParam | |
import nextflow.script.params.OutputsList | ||
import nextflow.script.params.TupleInParam | ||
import nextflow.script.params.TupleOutParam | ||
|
||
import java.util.concurrent.atomic.AtomicLong | ||
|
||
/** | ||
* Model a direct acyclic graph of the pipeline execution. | ||
* | ||
|
@@ -81,10 +84,8 @@ class DAG { | |
dataflowBroadcastLookup.put(readChannel, broadcastChannel) | ||
} | ||
|
||
@PackageScope | ||
List<Vertex> getVertices() { vertices } | ||
|
||
@PackageScope | ||
List<Edge> getEdges() { edges } | ||
|
||
boolean isEmpty() { edges.size()==0 && vertices.size()==0 } | ||
|
@@ -378,9 +379,10 @@ class DAG { | |
* @author Paolo Di Tommaso <[email protected]> | ||
*/ | ||
@ToString(includeNames = true, includes = 'label,type', includePackage=false) | ||
@PackageScope | ||
class Vertex { | ||
|
||
static private AtomicLong nextID = new AtomicLong() | ||
|
||
/** | ||
* The vertex label | ||
*/ | ||
|
@@ -398,6 +400,11 @@ class DAG { | |
|
||
TaskProcessor process | ||
|
||
/** | ||
* unique Id | ||
*/ | ||
final long id = nextID.getAndIncrement() | ||
|
||
/** | ||
* Create a DAG vertex instance | ||
* | ||
|
@@ -433,11 +440,12 @@ class DAG { | |
* | ||
* @author Paolo Di Tommaso <[email protected]> | ||
*/ | ||
@PackageScope | ||
@ToString(includeNames = true, includes = 'label,from,to', includePackage=false) | ||
@MapConstructor | ||
class Edge { | ||
|
||
static private AtomicLong nextID = new AtomicLong() | ||
|
||
/** | ||
* The Dataflow channel that originated this graph edge | ||
*/ | ||
|
@@ -458,6 +466,11 @@ class DAG { | |
*/ | ||
String label | ||
|
||
/** | ||
* unique Id | ||
*/ | ||
final long id = nextID.getAndIncrement() | ||
|
||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters