Class DoFn.ProcessContinuation

java.lang.Object
org.apache.beam.sdk.transforms.DoFn.ProcessContinuation
Enclosing class:
DoFn<InputT extends @Nullable Object,OutputT extends @Nullable Object>

public abstract static class DoFn.ProcessContinuation extends Object
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 Details

    • ProcessContinuation

      public ProcessContinuation()
  • Method Details

    • 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, the DoFn promises that there is no more work remaining for the current element, so the runner should not resume the DoFn.ProcessElement call.
    • resumeDelay

      public 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. By default, zero.
    • withResumeDelay

      public DoFn.ProcessContinuation withResumeDelay(Duration resumeDelay)
      Builder method to set the value of resumeDelay().