Sends the provided message
to the Raft node specified by receiverId
in the cluster specified by cluster
. The message will be lost if the
receiving node has not called startReceivingRaftMessages()
yet.
The message that should be sent. Is of type
RaftData
.
Identifies the node the message should be sent to.
Identifies the cluster of the node the message should be sent to.
Returns an observable that can be used to observe messages sent to the
Raft node specified by the provided receiverId
in the cluster specified
by cluster
via sendRaftMessage()
. The returned observable should emit
all messages sent to this node after this function was called.
Specifies the Raft node whose messages will be received.
Specifies the cluster of the Raft node whose messages will be received.
An observable that, whenever a new message has been received,
emits it. The received messages should be of type RaftData
.
Broadcasts the provided joinRequest
to all Raft nodes in the Raft
cluster specified by cluster
that are listening through
startAcceptingJoinRequests()
and returns an observable that emits
whenever a listening node accepts the join request.
The join request that should be broadcasted. Is of
type RaftData
.
Specifies the cluster inside which the join request should be broadcasted.
An observable that, whenever a listening node accepts the join request, emits.
Returns an observable that emits whenever a new join request has been
broadcasted via broadcastJoinRequest()
in the cluster specified by
cluster
. The emitted tuple consists of the broadcasted join request
together with an accept callback that can be used to signal to the
broadcaster that the join request was accepted.
Specifies the cluster whose broadcasted join requests should be emitted from the returned observable.
An observable that, whenever a new join request has been
broadcasted, emits a tuple containing the join request and an accept
callback that can be used to signal to the broadcaster that the join
request was accepted. The join request should be of type
RaftData
.
Generated using TypeDoc
Interface used by Raft to send messages to and receive messages from other nodes as well as to broadcast join requests to and answer join requests from other nodes.
Remark
Users can overwrite
getRaftCommunicationImplementation
to provide their own implementation of this interface if needed.