StreamManager
Manages the state of a single stream.
Functions
True if persisted counts associated with the index checkpointId are equal to the number of records read.
Suspend until the stream completes, returning the result.
Some destinations need to perform expensive post-processing at the end of a sync, but can skip that post-processing if the sync had 0 records. So we should tell the destination whether any records were processed.
Count incoming record and return the record's index. If markEndOfStream has been called, this should throw an exception.
True if all records in the stream have been marked as completed AND the stream has been marked as complete.
Mark the end-of-stream, set the end of stream variant (complete or incomplete) and return the record count. Expect this exactly once. Expect no further countRecordIn, and expect that markProcessingSucceeded will always occur after this, while markProcessingFailed can occur before or after.
Indicates destination processing of the stream failed. Returns false if task was already complete
Indicates destination processing of the stream succeeded, regardless of complete/incomplete status. This should only be called after all records and end of stream messages have been read.
Whether we received a stream complete message for the managed stream.
Mark this stream manager as having initiated a terminal task (i.e. CloseStreamTask or FailStreamTask).