Interface Realized

All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
AsyncProjector, Collector<T>, FlatProjector, LopsidedJoiner<T>, Projector, Relation, Restrictor, SinkConstructor, TupleInput
All Known Implementing Classes:
DefaultRestrictor, EmptyRelation

public interface Realized extends AutoCloseable

Interface for other interfaces that can be returned from a Step.realize(RealizationInput).

A Realized object should be relatively cheap to construct and should avoid performing any up-front computation based on its parameters. Expensive objects should be lazily created using the ExpensiveResource wrapper or some other mechanism. Similarly, these objects can be cleaned up via the close method.

For more discussion on the life-cycle of executable pipeline objects, see GL605

  • Method Details

    • getRealizedInterface

      static Class<? extends Realized> getRealizedInterface(Class<? extends Realized> clazz)

      Utility for pulling which Realized sub-interface is being implemented by a class that implements realized class

    • close

      default void close()

      Clean up any resources allocated to this Realized thing. This might involve removing temporary files, closing or flushing a network connection to some external service, or terminating some child processes. Note that it's expected that this object won't be used again after being closed.

      In some instances, implementations may want to remove references to large (in terms of memory) objects so that they can be garbage collected even if references to the pipeline continue to keep them 'live' in the JVM's object graph

      Specified by:
      close in interface AutoCloseable
    • getProducedType

      Struct getProducedType()

      The type of tuple that come out of this realized thing, or Struct.EMPTY_STRUCT if nothing