szetszwo commented on code in PR #1534:
URL: https://github.com/apache/ratis/pull/1534#discussion_r3686377040
##########
ratis-server-api/src/main/java/org/apache/ratis/statemachine/StateMachine.java:
##########
@@ -385,6 +385,19 @@ interface DataStream {
default Executor getExecutor() {
return null;
}
+
+ /**
+ * Handle a command received in the middle of a data stream.
+ * The {@code streamOffset} indicates the current byte offset in the stream
+ * (i.e. the total number of data bytes received so far).
+ *
+ * @param command the command payload
+ * @param streamOffset the current stream byte offset
+ * @return a future for the command task
+ */
+ default CompletableFuture<?> onCommand(ByteBuffer command, long
streamOffset) {
Review Comment:
Since this is a commnad, it should return CompletableFuture\<Message>.
##########
ratis-server-api/src/main/java/org/apache/ratis/statemachine/StateMachine.java:
##########
@@ -385,6 +385,19 @@ interface DataStream {
default Executor getExecutor() {
return null;
}
+
+ /**
+ * Handle a command received in the middle of a data stream.
+ * The {@code streamOffset} indicates the current byte offset in the stream
+ * (i.e. the total number of data bytes received so far).
+ *
+ * @param command the command payload
+ * @param streamOffset the current stream byte offset
+ * @return a future for the command task
+ */
+ default CompletableFuture<?> onCommand(ByteBuffer command, long
streamOffset) {
Review Comment:
Since this is a commnad, it should return CompletableFuture\<ByteBuffer>.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]