Interface HasOffset
public interface HasOffset
Interface for any Spark
Receiver that supports
reading from and to some offset.-
Method Summary
Modifier and TypeMethodDescriptionReturns exclusive end offset to which the reading from current page will occur.default voidsetCheckpoint(Long recordsProcessed) SomeReceiversupport mechanism of checkpoint (e.g.voidsetStartOffset(Long offset) Sets the start offset.
-
Method Details
-
setStartOffset
Sets the start offset.- Parameters:
offset- inclusive start offset from which the reading should be started.
-
getEndOffset
Long getEndOffset()Returns exclusive end offset to which the reading from current page will occur. -
setCheckpoint
SomeReceiversupport mechanism of checkpoint (e.g. ack). This method should be called before stopping the receiver.
-