Class CachedSideInputReader

  • All Implemented Interfaces:
    org.apache.beam.runners.core.SideInputReader

    @Internal
    public class CachedSideInputReader
    extends java.lang.Object
    implements org.apache.beam.runners.core.SideInputReader
    SideInputReader that caches results for costly Materializations. Concurrent access is not expected, but it won't impact correctness.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> boolean contains​(org.apache.beam.sdk.values.PCollectionView<T> view)  
      <T> @Nullable T get​(org.apache.beam.sdk.values.PCollectionView<T> view, org.apache.beam.sdk.transforms.windowing.BoundedWindow window)  
      boolean isEmpty()  
      static org.apache.beam.runners.core.SideInputReader of​(org.apache.beam.runners.core.SideInputReader reader, java.util.Collection<org.apache.beam.sdk.values.PCollectionView<?>> views)
      Creates a SideInputReader that caches results for costly Materializations if present, otherwise the SideInputReader is returned as is.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • of

        public static org.apache.beam.runners.core.SideInputReader of​(org.apache.beam.runners.core.SideInputReader reader,
                                                                      java.util.Collection<org.apache.beam.sdk.values.PCollectionView<?>> views)
        Creates a SideInputReader that caches results for costly Materializations if present, otherwise the SideInputReader is returned as is. Concurrent access is not expected, but it won't impact correctness.
      • get

        public <T> @Nullable T get​(org.apache.beam.sdk.values.PCollectionView<T> view,
                                   org.apache.beam.sdk.transforms.windowing.BoundedWindow window)
        Specified by:
        get in interface org.apache.beam.runners.core.SideInputReader
      • contains

        public <T> boolean contains​(org.apache.beam.sdk.values.PCollectionView<T> view)
        Specified by:
        contains in interface org.apache.beam.runners.core.SideInputReader
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface org.apache.beam.runners.core.SideInputReader