Skip to content

Commit ef04c16

Browse files
[SDP] DataflowGraphRegistry
1 parent f66e290 commit ef04c16

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

docs/declarative-pipelines/DataflowGraphRegistry.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DataflowGraphRegistry
22

3-
`DataflowGraphRegistry` is a registry of [Dataflow Graphs](#dataflowGraphs).
3+
`DataflowGraphRegistry` is a registry of [Dataflow Graphs](#dataflowGraphs) (a mere wrapper around a collection of [GraphRegistrationContext](GraphRegistrationContext.md)s)
44

55
!!! note "Scala object"
66
`DataflowGraphRegistry` is an `object` in Scala which means it is a class that has exactly one instance (itself).
@@ -19,13 +19,27 @@ val graphId = DataflowGraphRegistry.createDataflowGraph(
1919
defaultSqlConf=Map.empty)
2020
```
2121

22+
```scala
23+
assert(DataflowGraphRegistry.getAllDataflowGraphs.size == 1)
24+
```
25+
2226
## Dataflow Graphs { #dataflowGraphs }
2327

2428
```scala
2529
dataflowGraphs: ConcurrentHashMap[String, GraphRegistrationContext]
2630
```
2731

28-
`DataflowGraphRegistry` creates an empty collection of [GraphRegistrationContext](GraphRegistrationContext.md)s by their UUIDs.
32+
`DataflowGraphRegistry` manages [GraphRegistrationContext](GraphRegistrationContext.md)s (by graph IDs).
33+
34+
A new [GraphRegistrationContext](GraphRegistrationContext.md) is added when `DataflowGraphRegistry` is requested to [createDataflowGraph](#createDataflowGraph).
35+
36+
A single [GraphRegistrationContext](GraphRegistrationContext.md) can be looked up with [getDataflowGraph](#getDataflowGraph) and [getDataflowGraphOrThrow](#getDataflowGraphOrThrow).
37+
38+
All the [GraphRegistrationContext](GraphRegistrationContext.md)s can be returned with [getAllDataflowGraphs](#getAllDataflowGraphs).
39+
40+
A [GraphRegistrationContext](GraphRegistrationContext.md) is removed when [dropDataflowGraph](#dropDataflowGraph).
41+
42+
`dataflowGraphs` is cleared up with [dropAllDataflowGraphs](#dropAllDataflowGraphs).
2943

3044
## createDataflowGraph { #createDataflowGraph }
3145

0 commit comments

Comments
 (0)