Introduction
Element data is the container for data that is returned as a result of the processing performed by a flow element.
Data Structure
The precise details of the storage structure used internally by element data will vary by language and even by flow element implementation. However, element data must always expose its contents as a collection of key/value pairs.
An element data also contains references to the Pipeline it is associated with. This is useful for data which may just be a translation layer for other data, or if metadata needs to be retrieved by the element data.
Life Cycle
Element data instances are typically created by a specific factory method that is associated with a given flow element. This can be used by the flow element to create new element data instances before they are added to flow data.
Although element data instances are stored within flow data, they must not be disposed of at the same time. This is because the element data may be stored in other locations such as a cache. Equally, it must not be disposed when it leaves a cache as it may still be in use externally to the Pipeline.
As such, memory managed languages rely on the finalizer to dispose of any associated resources cleanly.
Thread Safety
The thread-safety of a given element data instance is directly tied to its internal data structure.