You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactored the code for building pipelines in Metamorph
In the original implementation of Metamorph `Data` and `Collect` objects
managed the plumbing of their function pipelines internally (via
`AbstractNamedValuePipeHead`). From the perspective of the
`MorphBuilder` `Data` and `Collect` objects were connected directly. The
fact that the connection was actually done through the function pipeline
was hidden. While this approach simplified the `MorphBuilder`, it
increased the complexity of the interfaces for connecting the different
types of objects in Metamorph. Additionally, functions were required to
handle the source parameter in the `receive` method differently compared
to the implementations of the method in `Data` or `Collect` objects.
Finally, it the half-hidden implementation of the function pipelines
makes it very hard to add interceptors (e.g. for logging or debugging)
to the pipe system generated from a Metamorph script.
This commit tries to solve the short-comings of the original
implementation with to changes. First, connections of `Function`, `Data`
and `Collect` objects are now handled in the same way and the function
pipelines are no longer hidden in the other two objects. Second, the
objects are no longer connected to a receiver (via
`setNamedValueReceiver`) but the connection is set the other way round
using `addNamedValueSource`. While this approach appears slightly less
intutive than the original method, it removes the necessity for
calling `addNamedValueSource` in addition to `setNamedValueReceiver`.
Furthermore it unifies setting of an object as name source or
condition source and setting an object as standard data source. This is
now all done from the perspective of the receiver. This simplifies the
implementation of the relevant methods in the collectors.
0 commit comments