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
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 Summary
Modifier and TypeMethodDescriptiondefault voidclose()Clean up any resources allocated to thisRealizedthing.The type of tuple that come out of this realized thing, orStruct.EMPTY_STRUCTif nothinggetRealizedInterface(Class<? extends Realized> clazz) Utility for pulling whichRealizedsub-interface is being implemented by a class that implements realized class
-
Method Details
-
getRealizedInterface
Utility for pulling which
Realizedsub-interface is being implemented by a class that implements realized class -
close
default void close()Clean up any resources allocated to this
Realizedthing. 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:
closein interfaceAutoCloseable
-
getProducedType
Struct getProducedType()The type of tuple that come out of this realized thing, or
Struct.EMPTY_STRUCTif nothing
-