Class CacheTransformation<T>

  • Type Parameters:
    T - The type of the elements in the cache intermediate result.

    @Internal
    public class CacheTransformation<T>
    extends Transformation<T>
    When in batch mode, the CacheTransformation represents the intermediate result of the upper stream should be cached when it is computed at the first time. And it consumes the cached intermediate result in later jobs. In stream mode, it has no affect.
    • Constructor Detail

      • CacheTransformation

        public CacheTransformation​(Transformation<T> transformationToCache,
                                   String name)
        Creates a new Transformation with the given name, output type and parallelism.
        Parameters:
        name - The name of the Transformation, this will be shown in Visualizations and the Log
    • Method Detail

      • getTransitivePredecessorsInternal

        protected List<Transformation<?>> getTransitivePredecessorsInternal()
        Description copied from class: Transformation
        Returns all transitive predecessor Transformations of this Transformation. This is, for example, used when determining whether a feedback edge of an iteration actually has the iteration head as a predecessor.
        Specified by:
        getTransitivePredecessorsInternal in class Transformation<T>
        Returns:
        The list of transitive predecessors.
      • getTransformationToCache

        public Transformation<T> getTransformationToCache()
      • setCached

        public void setCached​(boolean cached)
      • isCached

        public boolean isCached()