@Evolving public interface SupportsTriggerAvailableNow extends SupportsAdmissionControl
| Modifier and Type | Method and Description |
|---|---|
void |
prepareForTriggerAvailableNow()
This will be called at the beginning of streaming queries with Trigger.AvailableNow, to let the
source record the offset for the current latest data at the time (a.k.a the target offset for
the query).
|
getDefaultReadLimit, latestOffset, reportLatestOffsetcommit, deserializeOffset, initialOffset, stopvoid prepareForTriggerAvailableNow()
latestOffset is called.
Note that there is an exception on the first uncommitted batch after a restart, where the end
offset is not derived from the current latest offset. Sources need to take special
considerations if wanting to assert such relation. One possible way is to have an internal
flag in the source to indicate whether it is Trigger.AvailableNow, set the flag in this method,
and record the target offset in the first call of
latestOffset.