public interface RestrictionTracker<RestrictionT>
DoFn
.Modifier and Type | Method and Description |
---|---|
void |
checkDone()
Called by the runner after
DoFn.ProcessElement returns. |
RestrictionT |
checkpoint()
Signals that the current
DoFn.ProcessElement call should terminate as soon as possible:
after this method returns, the tracker MUST refuse all future claim calls, and checkDone() MUST succeed. |
RestrictionT |
currentRestriction()
Returns a restriction accurately describing the full range of work the current
DoFn.ProcessElement call will do, including already completed work. |
RestrictionT currentRestriction()
DoFn.ProcessElement
call will do, including already completed work.RestrictionT checkpoint()
DoFn.ProcessElement
call should terminate as soon as possible:
after this method returns, the tracker MUST refuse all future claim calls, and checkDone()
MUST succeed.
Modifies currentRestriction()
. Returns a restriction representing the rest of the
work: the old value of currentRestriction()
is equivalent to the new value and the
return value of this method combined. Must be called at most once on a given object.
void checkDone() throws java.lang.IllegalStateException
DoFn.ProcessElement
returns.
Must throw an exception with an informative error message, if there is still any unclaimed work remaining in the restriction.
java.lang.IllegalStateException