Skip to content

Commit

Permalink
chore(store): add some simple docst
Browse files Browse the repository at this point in the history
Signed-off-by: daniel-y <[email protected]>
  • Loading branch information
daniel-y committed Sep 15, 2023
1 parent 82cddb1 commit d3094fd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions store/src/main/java/com/automq/rocketmq/store/StreamStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,25 @@
import com.automq.rocketmq.stream.api.RecordBatch;
import java.util.concurrent.CompletableFuture;

/**
* A high level abstraction of stream store, hidden the details of S3Stream module.
*/
public interface StreamStore {
/**
* Fetch records from stream store.
*
* @param streamId the target stream id.
* @param startOffset the start offset of the fetch.
* @param maxCount the max return count of the fetch.
* @return the future of fetch result.
*/
CompletableFuture<FetchResult> fetch(long streamId, long startOffset, int maxCount);

/**
* Append record batch to stream store.
* @param streamId the target stream id.
* @param recordBatch the record batch to append.
* @return the future of append result.
*/
CompletableFuture<AppendResult> append(long streamId, RecordBatch recordBatch);
}

0 comments on commit d3094fd

Please sign in to comment.