Package org.apache.beam.sdk.transforms
Class DoFn.ProcessContinuation
- java.lang.Object
-
- org.apache.beam.sdk.transforms.DoFn.ProcessContinuation
-
- Enclosing class:
- DoFn<InputT extends @Nullable java.lang.Object,OutputT extends @Nullable java.lang.Object>
public abstract static class DoFn.ProcessContinuation extends java.lang.Object
When used as a return value ofDoFn.ProcessElement
, indicates whether there is more work to be done for the current element.If the
DoFn.ProcessElement
call completes because of a failedtryClaim()
call on theRestrictionTracker
, then the call MUST returnstop()
.
-
-
Constructor Summary
Constructors Constructor Description ProcessContinuation()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static DoFn.ProcessContinuation
resume()
Indicates that there is more work to be done for the current element.abstract org.joda.time.Duration
resumeDelay()
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
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.static DoFn.ProcessContinuation
stop()
Indicates that there is no more work to be done for the current element.DoFn.ProcessContinuation
withResumeDelay(org.joda.time.Duration resumeDelay)
Builder method to set the value ofresumeDelay()
.
-
-
-
Method Detail
-
stop
public static DoFn.ProcessContinuation stop()
Indicates that there is no more work to be done for the current element.
-
resume
public static DoFn.ProcessContinuation 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
public abstract org.joda.time.Duration 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
public DoFn.ProcessContinuation withResumeDelay(org.joda.time.Duration resumeDelay)
Builder method to set the value ofresumeDelay()
.
-
-