Interface Realized
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
Collector<T>
,FlatProjector
,LopsidedJoiner<T>
,Projector
,Relation
,Restrictor
,SinkConstructor
,StreamingCollector<T>
- All Known Implementing Classes:
DefaultRestrictor
,EmptyRelation
Marker 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
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 interfaceAutoCloseable
-