Interface HybridSource.SourceFactory<T,SourceT extends Source<T,?,?>,FromEnumT extends SplitEnumerator>
-
- All Superinterfaces:
Serializable
- Enclosing class:
- HybridSource<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@PublicEvolving @FunctionalInterface public static interface HybridSource.SourceFactory<T,SourceT extends Source<T,?,?>,FromEnumT extends SplitEnumerator> extends Serializable
Factory for underlying sources ofHybridSource
.This factory permits building of a source at graph construction time or deferred at switch time. Provides the ability to set a start position in any way a specific source allows. Future convenience could be built on top of it, for example a default implementation that recognizes optional interfaces to transfer position in a universal format.
Called when the current enumerator has finished. The previous source's final state can thus be used to construct the next source, as required for dynamic position transfer at time of switching.
If start position is known at job submission time, the source can be constructed in the entry point and simply wrapped into the factory, providing the benefit of validation during submission.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SourceT
create(HybridSource.SourceSwitchContext<FromEnumT> context)
-
-
-
Method Detail
-
create
SourceT create(HybridSource.SourceSwitchContext<FromEnumT> context)
-
-