Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,15 @@ default CompletableFuture<DataStreamReply> writeAsync(File src, long position, l
* The server state machine may handle the command via its data-stream command hook
* instead of writing bytes to the data channel.
*
* This is an optional API. Implementations that do not support stream commands
* may rely on this default, which throws {@link UnsupportedOperationException}.
*
* @param command the command payload
* @return a future of the reply
*/
CompletableFuture<DataStreamReply> commandAsync(ByteBuffer command);
default CompletableFuture<DataStreamReply> commandAsync(ByteBuffer command) {
throw new UnsupportedOperationException(getClass() + " does not support commandAsync");
}

/**
* Return the future of the {@link RaftClientReply}
Expand Down
Loading