public interface ClusterCommunicationService
| Modifier and Type | Method and Description |
|---|---|
void |
addSubscriber(MessageSubject subject,
ClusterMessageHandler subscriber)
Adds a new subscriber for the specified message subject.
|
boolean |
broadcast(ClusterMessage message)
Broadcast a message to all controller nodes.
|
boolean |
broadcastIncludeSelf(ClusterMessage message)
Broadcast a message to all controller nodes including self.
|
boolean |
multicast(ClusterMessage message,
Set<NodeId> nodeIds)
Multicast a message to a set of controller nodes.
|
void |
removeSubscriber(MessageSubject subject)
Removes a subscriber for the specified message subject.
|
com.google.common.util.concurrent.ListenableFuture<byte[]> |
sendAndReceive(ClusterMessage message,
NodeId toNodeId)
Sends a message synchronously.
|
boolean |
unicast(ClusterMessage message,
NodeId toNodeId)
Sends a message to the specified controller node.
|
boolean broadcast(ClusterMessage message) throws IOException
message - message to sendIOException - when I/O exception of some sort has occurredboolean broadcastIncludeSelf(ClusterMessage message) throws IOException
message - message to sendIOException - when I/O exception of some sort has occurredboolean unicast(ClusterMessage message, NodeId toNodeId) throws IOException
message - message to sendtoNodeId - node identifierIOException - when I/O exception of some sort has occurredboolean multicast(ClusterMessage message, Set<NodeId> nodeIds) throws IOException
message - message to sendnodeIds - recipient node identifiersIOException - when I/O exception of some sort has occurredcom.google.common.util.concurrent.ListenableFuture<byte[]> sendAndReceive(ClusterMessage message, NodeId toNodeId) throws IOException
message - message to sendtoNodeId - recipient node identifierIOException - when I/O exception of some sort has occurredvoid addSubscriber(MessageSubject subject, ClusterMessageHandler subscriber)
subject - message subjectsubscriber - message subscribervoid removeSubscriber(MessageSubject subject)
subject - message subjectCopyright © 2015. All rights reserved.