Package org.apache.beam.sdk.transforms
Class DoFn.ProcessContinuation
java.lang.Object
org.apache.beam.sdk.transforms.DoFn.ProcessContinuation
When used as a return value of
DoFn.ProcessElement
, indicates whether there is more work to
be done for the current element.
If the DoFn.ProcessElement
call completes because of a failed tryClaim()
call on
the RestrictionTracker
, then the call MUST return stop()
.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DoFn.ProcessContinuation
resume()
Indicates that there is more work to be done for the current element.abstract Duration
A minimum duration that should elapse between the end of thisDoFn.ProcessElement
call and theDoFn.ProcessElement
call continuing processing of the same element.abstract boolean
If false, theDoFn
promises that there is no more work remaining for the current element, so the runner should not resume theDoFn.ProcessElement
call.static DoFn.ProcessContinuation
stop()
Indicates that there is no more work to be done for the current element.withResumeDelay
(Duration resumeDelay) Builder method to set the value ofresumeDelay()
.
-
Constructor Details
-
ProcessContinuation
public ProcessContinuation()
-
-
Method Details
-
stop
Indicates that there is no more work to be done for the current element. -
resume
Indicates that there is more work to be done for the current element. -
shouldResume
public abstract boolean shouldResume()If false, theDoFn
promises that there is no more work remaining for the current element, so the runner should not resume theDoFn.ProcessElement
call. -
resumeDelay
A minimum duration that should elapse between the end of thisDoFn.ProcessElement
call and theDoFn.ProcessElement
call continuing processing of the same element. By default, zero. -
withResumeDelay
Builder method to set the value ofresumeDelay()
.
-