public interface Stream {
/**
* Get stream id
*/
long streamId();
/**
* Get stream start offset.
*/
long startOffset();
/**
* Get stream next append record offset.
*/
long nextOffset();
/**
* Append RecordBatch to stream.
*/
CompletableFuture<AppendResult> append(RecordBatch recordBatch);
/**
* Fetch RecordBatch list from a stream.
*/
CompletableFuture<FetchResult> fetch(long startOffset, long endOffset, int maxBytesHint);
/**
* Trim stream.
*/
CompletableFuture<Void> trim(long newStartOffset);
}