public abstract static class DoFn.ProcessContinuation
extends java.lang.Object
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 and Description |
---|
ProcessContinuation() |
Modifier and Type | Method and Description |
---|---|
static DoFn.ProcessContinuation |
resume()
Indicates that there is more work to be done for the current element.
|
abstract Duration |
resumeDelay()
A minimum duration that should elapse between the end of this
DoFn.ProcessElement call and
the DoFn.ProcessElement call continuing processing of the same element. |
abstract boolean |
shouldResume()
If false, the
DoFn promises that there is no more work remaining for the current
element, so the runner should not resume the DoFn.ProcessElement call. |
static DoFn.ProcessContinuation |
stop()
Indicates that there is no more work to be done for the current element.
|
DoFn.ProcessContinuation |
withResumeDelay(Duration resumeDelay)
Builder method to set the value of
resumeDelay() . |
public static DoFn.ProcessContinuation stop()
public static DoFn.ProcessContinuation resume()
public abstract boolean shouldResume()
DoFn
promises that there is no more work remaining for the current
element, so the runner should not resume the DoFn.ProcessElement
call.public abstract Duration resumeDelay()
DoFn.ProcessElement
call and
the DoFn.ProcessElement
call continuing processing of the same element. By default, zero.public DoFn.ProcessContinuation withResumeDelay(Duration resumeDelay)
resumeDelay()
.