Interface RaftChannel
public interface RaftChannel
A channel abstraction to invoke commands on the RAFT channel.
- Since:
- 14.0
-
Method Summary
Modifier and TypeMethodDescriptionraftId()CompletionStage<org.infinispan.commons.io.ByteBuffer>send(org.infinispan.commons.io.ByteBuffer buffer) Sends aByteBufferto the RAFT channel to be ordered by the RAFT leader.
-
Method Details
-
send
CompletionStage<org.infinispan.commons.io.ByteBuffer> send(org.infinispan.commons.io.ByteBuffer buffer) Sends aByteBufferto the RAFT channel to be ordered by the RAFT leader.After the RAFT leader commits,
RaftStateMachine.apply(ByteBuffer)is invoked with theByteBufferand its return value used to complete theCompletionStage.- Parameters:
buffer- The data to send.- Returns:
- A
CompletionStagewhich is completed with theRaftStateMachine.apply(ByteBuffer)response.
-
channelName
String channelName()- Returns:
- The channel name used to register the
RaftStateMachineviaRaftManager.getOrRegisterStateMachine(String, Supplier, RaftChannelConfiguration).
-
raftId
String raftId()- Returns:
- The node's raft-id.
-