Interface SegmentProgressStrategyFactory
- All Known Implementing Classes:
CheckpointingProgressStrategyFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Creates a
SegmentProgressStrategy for a single segment, binding it to that segment's
SegmentProgressContext. One factory is selected per processor and applied to every segment it processes, so
all segments of a processor share the same progress-handling behaviour.
The default tokenStoring() factory produces a TokenStoringProgressStrategy. A processor with advanced
progress handling (such as self-checkpointing) supplies a different factory.
Internal API. This interface is marked Internal: it is part of the progress-persistence seam, consumed
by advanced (and out-of-module) progress handling rather than by end users, and its shape may change in a minor or
patch release.
- Since:
- 5.3.0
- Author:
- Allard Buijze
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreate(SegmentProgressContext context) Creates theSegmentProgressStrategyfor the segment owning the givencontext.Returns the default factory, producing aTokenStoringProgressStrategythat persists the batch-end token every batch.
-
Method Details
-
create
Creates theSegmentProgressStrategyfor the segment owning the givencontext.The
contextis bound to a singlesegment; the returned strategy should retain it to observe and persist that segment's progress.- Parameters:
context- the progress context to bind the strategy to- Returns:
- a strategy bound to
context
-
tokenStoring
Returns the default factory, producing aTokenStoringProgressStrategythat persists the batch-end token every batch.- Returns:
- a factory producing the default token-storing strategy
-