public interface ClusterCommunicationService
| Modifier and Type | Method and Description |
|---|---|
default <M> void |
broadcast(String subject,
M message)
Broadcasts a message to all controller nodes.
|
<M> void |
broadcast(String subject,
M message,
Function<M,byte[]> encoder)
Broadcasts a message to all controller nodes.
|
default <M> void |
broadcastIncludeSelf(String subject,
M message)
Broadcasts a message to all controller nodes including self.
|
<M> void |
broadcastIncludeSelf(String subject,
M message,
Function<M,byte[]> encoder)
Broadcasts a message to all controller nodes including self.
|
<M> void |
multicast(String subject,
M message,
Function<M,byte[]> encoder,
Set<MemberId> memberIds)
Multicasts a message to a set of controller nodes.
|
default <M> void |
multicast(String subject,
M message,
Set<MemberId> memberIds)
Multicasts a message to a set of controller nodes.
|
default <M,R> CompletableFuture<R> |
send(String subject,
M message,
Function<M,byte[]> encoder,
Function<byte[],R> decoder,
MemberId toMemberId)
Sends a message and expects a reply.
|
<M,R> CompletableFuture<R> |
send(String subject,
M message,
Function<M,byte[]> encoder,
Function<byte[],R> decoder,
MemberId toMemberId,
Duration timeout)
Sends a message and expects a reply.
|
default <M,R> CompletableFuture<R> |
send(String subject,
M message,
MemberId toMemberId)
Sends a message and expects a reply.
|
default <M,R> CompletableFuture<R> |
send(String subject,
M message,
MemberId toMemberId,
Duration timeout)
Sends a message and expects a reply.
|
default <M> CompletableFuture<Void> |
subscribe(String subject,
BiConsumer<io.atomix.utils.net.Address,M> handler,
Executor executor)
Adds a new subscriber for the specified message subject.
|
default <M> CompletableFuture<Void> |
subscribe(String subject,
Consumer<M> handler,
Executor executor)
Adds a new subscriber for the specified message subject.
|
<M> CompletableFuture<Void> |
subscribe(String subject,
Function<byte[],M> decoder,
BiConsumer<io.atomix.utils.net.Address,M> handler,
Executor executor)
Adds a new subscriber for the specified message subject.
|
<M> CompletableFuture<Void> |
subscribe(String subject,
Function<byte[],M> decoder,
Consumer<M> handler,
Executor executor)
Adds a new subscriber for the specified message subject.
|
<M,R> CompletableFuture<Void> |
subscribe(String subject,
Function<byte[],M> decoder,
Function<M,CompletableFuture<R>> handler,
Function<R,byte[]> encoder)
Adds a new subscriber for the specified message subject.
|
<M,R> CompletableFuture<Void> |
subscribe(String subject,
Function<byte[],M> decoder,
Function<M,R> handler,
Function<R,byte[]> encoder,
Executor executor)
Adds a new subscriber for the specified message subject.
|
default <M,R> CompletableFuture<Void> |
subscribe(String subject,
Function<M,CompletableFuture<R>> handler)
Adds a new subscriber for the specified message subject.
|
default <M,R> CompletableFuture<Void> |
subscribe(String subject,
Function<M,R> handler,
Executor executor)
Adds a new subscriber for the specified message subject.
|
<M> CompletableFuture<Void> |
unicast(String subject,
M message,
Function<M,byte[]> encoder,
MemberId toMemberId)
Sends a message to the specified controller node.
|
default <M> CompletableFuture<Void> |
unicast(String subject,
M message,
MemberId toMemberId)
Sends a message to the specified controller node.
|
void |
unsubscribe(String subject)
Removes a subscriber for the specified message subject.
|
default <M> void broadcast(String subject, M message)
M - message typesubject - message subjectmessage - message to send<M> void broadcast(String subject, M message, Function<M,byte[]> encoder)
M - message typesubject - message subjectmessage - message to sendencoder - function for encoding message to byte[]default <M> void broadcastIncludeSelf(String subject, M message)
M - message typesubject - message subjectmessage - message to send<M> void broadcastIncludeSelf(String subject, M message, Function<M,byte[]> encoder)
M - message typesubject - message subjectmessage - message to sendencoder - function for encoding message to byte[]default <M> CompletableFuture<Void> unicast(String subject, M message, MemberId toMemberId)
M - message typesubject - message subjectmessage - message to sendtoMemberId - destination node identifier<M> CompletableFuture<Void> unicast(String subject, M message, Function<M,byte[]> encoder, MemberId toMemberId)
M - message typesubject - message subjectmessage - message to sendencoder - function for encoding message to byte[]toMemberId - destination node identifierdefault <M> void multicast(String subject, M message, Set<MemberId> memberIds)
M - message typesubject - message subjectmessage - message to sendmemberIds - recipient node identifiers<M> void multicast(String subject, M message, Function<M,byte[]> encoder, Set<MemberId> memberIds)
M - message typesubject - message subjectmessage - message to sendencoder - function for encoding message to byte[]memberIds - recipient node identifiersdefault <M,R> CompletableFuture<R> send(String subject, M message, MemberId toMemberId)
M - request typeR - reply typesubject - message subjectmessage - message to sendtoMemberId - recipient node identifierdefault <M,R> CompletableFuture<R> send(String subject, M message, MemberId toMemberId, Duration timeout)
M - request typeR - reply typesubject - message subjectmessage - message to sendtoMemberId - recipient node identifiertimeout - response timeoutdefault <M,R> CompletableFuture<R> send(String subject, M message, Function<M,byte[]> encoder, Function<byte[],R> decoder, MemberId toMemberId)
M - request typeR - reply typesubject - message subjectmessage - message to sendencoder - function for encoding request to byte[]decoder - function for decoding response from byte[]toMemberId - recipient node identifier<M,R> CompletableFuture<R> send(String subject, M message, Function<M,byte[]> encoder, Function<byte[],R> decoder, MemberId toMemberId, Duration timeout)
M - request typeR - reply typesubject - message subjectmessage - message to sendencoder - function for encoding request to byte[]decoder - function for decoding response from byte[]toMemberId - recipient node identifiertimeout - response timeoutdefault <M,R> CompletableFuture<Void> subscribe(String subject, Function<M,R> handler, Executor executor)
M - incoming message typeR - reply message typesubject - message subjecthandler - handler function that processes the incoming message and produces a replyexecutor - executor to run this handler on<M,R> CompletableFuture<Void> subscribe(String subject, Function<byte[],M> decoder, Function<M,R> handler, Function<R,byte[]> encoder, Executor executor)
M - incoming message typeR - reply message typesubject - message subjectdecoder - decoder for resurrecting incoming messagehandler - handler function that processes the incoming message and produces a replyencoder - encoder for serializing replyexecutor - executor to run this handler ondefault <M,R> CompletableFuture<Void> subscribe(String subject, Function<M,CompletableFuture<R>> handler)
M - incoming message typeR - reply message typesubject - message subjecthandler - handler function that processes the incoming message and produces a reply<M,R> CompletableFuture<Void> subscribe(String subject, Function<byte[],M> decoder, Function<M,CompletableFuture<R>> handler, Function<R,byte[]> encoder)
M - incoming message typeR - reply message typesubject - message subjectdecoder - decoder for resurrecting incoming messagehandler - handler function that processes the incoming message and produces a replyencoder - encoder for serializing replydefault <M> CompletableFuture<Void> subscribe(String subject, Consumer<M> handler, Executor executor)
M - incoming message typesubject - message subjecthandler - handler for handling messageexecutor - executor to run this handler ondefault <M> CompletableFuture<Void> subscribe(String subject, BiConsumer<io.atomix.utils.net.Address,M> handler, Executor executor)
M - incoming message typesubject - message subjecthandler - handler for handling messageexecutor - executor to run this handler on<M> CompletableFuture<Void> subscribe(String subject, Function<byte[],M> decoder, Consumer<M> handler, Executor executor)
M - incoming message typesubject - message subjectdecoder - decoder to resurrecting incoming messagehandler - handler for handling messageexecutor - executor to run this handler on<M> CompletableFuture<Void> subscribe(String subject, Function<byte[],M> decoder, BiConsumer<io.atomix.utils.net.Address,M> handler, Executor executor)
M - incoming message typesubject - message subjectdecoder - decoder to resurrecting incoming messagehandler - handler for handling messageexecutor - executor to run this handler onvoid unsubscribe(String subject)
subject - message subjectCopyright © 2013–2018. All rights reserved.