public interface RaftClientProtocol
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<CloseSessionResponse> |
closeSession(MemberId memberId,
CloseSessionRequest request)
Sends a close session request to the given node.
|
CompletableFuture<CommandResponse> |
command(MemberId memberId,
CommandRequest request)
Sends a command request to the given node.
|
CompletableFuture<KeepAliveResponse> |
keepAlive(MemberId memberId,
KeepAliveRequest request)
Sends a keep alive request to the given node.
|
CompletableFuture<MetadataResponse> |
metadata(MemberId memberId,
MetadataRequest request)
Sends a metadata request to the given node.
|
CompletableFuture<OpenSessionResponse> |
openSession(MemberId memberId,
OpenSessionRequest request)
Sends an open session request to the given node.
|
CompletableFuture<QueryResponse> |
query(MemberId memberId,
QueryRequest request)
Sends a query request to the given node.
|
void |
registerHeartbeatHandler(Function<HeartbeatRequest,CompletableFuture<HeartbeatResponse>> handler)
Registers a heartbeat request callback.
|
void |
registerPublishListener(SessionId sessionId,
Consumer<PublishRequest> listener,
Executor executor)
Registers a publish request listener.
|
void |
reset(Collection<MemberId> members,
ResetRequest request)
Multicasts a reset request to all nodes in the cluster.
|
void |
unregisterHeartbeatHandler()
Unregisters the heartbeat request handler.
|
void |
unregisterPublishListener(SessionId sessionId)
Unregisters the publish request listener for the given session.
|
CompletableFuture<OpenSessionResponse> openSession(MemberId memberId, OpenSessionRequest request)
memberId - the node to which to send the requestrequest - the request to sendCompletableFuture<CloseSessionResponse> closeSession(MemberId memberId, CloseSessionRequest request)
memberId - the node to which to send the requestrequest - the request to sendCompletableFuture<KeepAliveResponse> keepAlive(MemberId memberId, KeepAliveRequest request)
memberId - the node to which to send the requestrequest - the request to sendCompletableFuture<QueryResponse> query(MemberId memberId, QueryRequest request)
memberId - the node to which to send the requestrequest - the request to sendCompletableFuture<CommandResponse> command(MemberId memberId, CommandRequest request)
memberId - the node to which to send the requestrequest - the request to sendCompletableFuture<MetadataResponse> metadata(MemberId memberId, MetadataRequest request)
memberId - the node to which to send the requestrequest - the request to sendvoid reset(Collection<MemberId> members, ResetRequest request)
members - the members to which to send the requestrequest - the reset request to multicastvoid registerHeartbeatHandler(Function<HeartbeatRequest,CompletableFuture<HeartbeatResponse>> handler)
handler - the heartbeat request handler to registervoid unregisterHeartbeatHandler()
void registerPublishListener(SessionId sessionId, Consumer<PublishRequest> listener, Executor executor)
sessionId - the session for which to listen for the publish requestlistener - the listener to registerexecutor - the executor with which to execute the listener callbackvoid unregisterPublishListener(SessionId sessionId)
sessionId - the session for which to unregister the listenerCopyright © 2013–2017. All rights reserved.