* Send changes to the D2 input for the given alias. * Returns the number of multiset entries sent.
(
alias: string,
changes: Array<ChangeMessage<any, string | number>>,
)
| 703 | * Returns the number of multiset entries sent. |
| 704 | */ |
| 705 | private sendChangesToD2( |
| 706 | alias: string, |
| 707 | changes: Array<ChangeMessage<any, string | number>>, |
| 708 | ): number { |
| 709 | if (this.disposed || !this.inputs || !this.graph) return 0 |
| 710 | |
| 711 | const input = this.inputs[alias] |
| 712 | if (!input) return 0 |
| 713 | |
| 714 | // Filter duplicates per alias |
| 715 | const sentKeys = this.sentToD2KeysByAlias.get(alias)! |
| 716 | const filtered = filterDuplicateInserts(changes, sentKeys) |
| 717 | |
| 718 | return sendChangesToInput(input, filtered) |
| 719 | } |
| 720 | |
| 721 | /** |
| 722 | * Run the D2 graph until quiescence, then emit accumulated events once. |
no test coverage detected