| 限定符和类型 | 方法和说明 |
|---|---|
static Endpoint |
JRaftUtils.getEndPoint(String s)
Create a Endpoint instance from a string in the form of "host:port",
returns null when string is blank.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
NodeManager.addAddress(Endpoint addr)
Adds a RPC service address.
|
boolean |
NodeManager.removeAddress(Endpoint addr)
Remove a RPC service address.
|
boolean |
NodeManager.serverExists(Endpoint addr)
Return true when RPC service is registered.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Endpoint |
PeerId.getEndpoint() |
| 构造器和说明 |
|---|
PeerId(Endpoint endpoint,
int idx) |
PeerId(Endpoint endpoint,
int idx,
int priority) |
| 限定符和类型 | 方法和说明 |
|---|---|
Endpoint |
SnapshotExecutorOptions.getAddr() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
SnapshotExecutorOptions.setAddr(Endpoint addr) |
| 限定符和类型 | 方法和说明 |
|---|---|
Future<com.google.protobuf.Message> |
CliClientService.addLearners(Endpoint endpoint,
CliRequests.AddLearnersRequest request,
RpcResponseClosure<CliRequests.LearnersOpResponse> done)
Add learners
|
Future<com.google.protobuf.Message> |
CliClientService.addPeer(Endpoint endpoint,
CliRequests.AddPeerRequest request,
RpcResponseClosure<CliRequests.AddPeerResponse> done)
Adds a peer.
|
Future<com.google.protobuf.Message> |
RaftClientService.appendEntries(Endpoint endpoint,
RpcRequests.AppendEntriesRequest request,
int timeoutMs,
RpcResponseClosure<RpcRequests.AppendEntriesResponse> done)
Sends a append-entries request and handle the response with done.
|
Future<com.google.protobuf.Message> |
CliClientService.changePeers(Endpoint endpoint,
CliRequests.ChangePeersRequest request,
RpcResponseClosure<CliRequests.ChangePeersResponse> done)
Change peers.
|
boolean |
RpcClient.checkConnection(Endpoint endpoint)
Check connection for given address.
|
boolean |
ClientService.checkConnection(Endpoint endpoint,
boolean createIfAbsent)
Check connection for given address and async to create a new one if there is no connection.
|
boolean |
RpcClient.checkConnection(Endpoint endpoint,
boolean createIfAbsent)
Check connection for given address and async to create a new one if there is no connection.
|
void |
RpcClient.closeConnection(Endpoint endpoint)
Close all connections of a address.
|
boolean |
ClientService.connect(Endpoint endpoint)
Connect to endpoint, returns true when success.
|
static RpcServer |
RaftRpcServerFactory.createAndStartRaftRpcServer(Endpoint endpoint)
Creates a raft RPC server and starts it.
|
static RpcServer |
RaftRpcServerFactory.createAndStartRaftRpcServer(Endpoint endpoint,
Executor raftExecutor,
Executor cliExecutor)
Creates a raft RPC server and starts it.
|
static RpcServer |
RaftRpcServerFactory.createRaftRpcServer(Endpoint endpoint)
Creates a raft RPC server with default request executors.
|
static RpcServer |
RaftRpcServerFactory.createRaftRpcServer(Endpoint endpoint,
Executor raftExecutor,
Executor cliExecutor)
Creates a raft RPC server with executors to handle requests.
|
default RpcServer |
RaftRpcFactory.createRpcServer(Endpoint endpoint)
Creates a raft RPC server.
|
RpcServer |
RaftRpcFactory.createRpcServer(Endpoint endpoint,
RaftRpcFactory.ConfigHelper<RpcServer> helper)
Creates a raft RPC server.
|
boolean |
ClientService.disconnect(Endpoint endpoint)
Disconnect from endpoint.
|
Future<com.google.protobuf.Message> |
RaftClientService.getFile(Endpoint endpoint,
RpcRequests.GetFileRequest request,
int timeoutMs,
RpcResponseClosure<RpcRequests.GetFileResponse> done)
Get a piece of file data by GetFileRequest, and handle the response with done.
|
Future<com.google.protobuf.Message> |
CliClientService.getLeader(Endpoint endpoint,
CliRequests.GetLeaderRequest request,
RpcResponseClosure<CliRequests.GetLeaderResponse> done)
Get the group leader.
|
Future<com.google.protobuf.Message> |
CliClientService.getPeers(Endpoint endpoint,
CliRequests.GetPeersRequest request,
RpcResponseClosure<CliRequests.GetPeersResponse> done)
Get all peers of the replication group.
|
Future<com.google.protobuf.Message> |
RaftClientService.installSnapshot(Endpoint endpoint,
RpcRequests.InstallSnapshotRequest request,
RpcResponseClosure<RpcRequests.InstallSnapshotResponse> done)
Sends a install-snapshot request and handle the response with done.
|
default void |
RpcClient.invokeAsync(Endpoint endpoint,
Object request,
InvokeCallback callback,
long timeoutMs)
Asynchronous invocation with a callback.
|
void |
RpcClient.invokeAsync(Endpoint endpoint,
Object request,
InvokeContext ctx,
InvokeCallback callback,
long timeoutMs)
Asynchronous invocation with a callback.
|
Object |
RpcClient.invokeSync(Endpoint endpoint,
Object request,
InvokeContext ctx,
long timeoutMs)
Synchronous invocation using a invoke context.
|
default Object |
RpcClient.invokeSync(Endpoint endpoint,
Object request,
long timeoutMs)
Synchronous invocation.
|
<T extends com.google.protobuf.Message> |
ClientService.invokeWithDone(Endpoint endpoint,
com.google.protobuf.Message request,
RpcResponseClosure<T> done,
int timeoutMs)
Send a requests and waits for response with callback, returns the request future.
|
boolean |
ClientService.isConnected(Endpoint endpoint)
Returns true when the endpoint's connection is active.
|
Future<com.google.protobuf.Message> |
RaftClientService.preVote(Endpoint endpoint,
RpcRequests.RequestVoteRequest request,
RpcResponseClosure<RpcRequests.RequestVoteResponse> done)
Sends a pre-vote request and handle the response with done.
|
Future<com.google.protobuf.Message> |
RaftClientService.readIndex(Endpoint endpoint,
RpcRequests.ReadIndexRequest request,
int timeoutMs,
RpcResponseClosure<RpcRequests.ReadIndexResponse> done)
Send a read-index request and handle the response with done.
|
Future<com.google.protobuf.Message> |
CliClientService.removeLearners(Endpoint endpoint,
CliRequests.RemoveLearnersRequest request,
RpcResponseClosure<CliRequests.LearnersOpResponse> done)
Remove learners
|
Future<com.google.protobuf.Message> |
CliClientService.removePeer(Endpoint endpoint,
CliRequests.RemovePeerRequest request,
RpcResponseClosure<CliRequests.RemovePeerResponse> done)
Removes a peer.
|
Future<com.google.protobuf.Message> |
RaftClientService.requestVote(Endpoint endpoint,
RpcRequests.RequestVoteRequest request,
RpcResponseClosure<RpcRequests.RequestVoteResponse> done)
Sends a request-vote request and handle the response with done.
|
Future<com.google.protobuf.Message> |
CliClientService.resetLearners(Endpoint endpoint,
CliRequests.ResetLearnersRequest request,
RpcResponseClosure<CliRequests.LearnersOpResponse> done)
Reset learners
|
Future<com.google.protobuf.Message> |
CliClientService.resetPeer(Endpoint endpoint,
CliRequests.ResetPeerRequest request,
RpcResponseClosure<RpcRequests.ErrorResponse> done)
Reset a peer.
|
Future<com.google.protobuf.Message> |
CliClientService.snapshot(Endpoint endpoint,
CliRequests.SnapshotRequest request,
RpcResponseClosure<RpcRequests.ErrorResponse> done)
Do a snapshot.
|
Future<com.google.protobuf.Message> |
RaftClientService.timeoutNow(Endpoint endpoint,
RpcRequests.TimeoutNowRequest request,
int timeoutMs,
RpcResponseClosure<RpcRequests.TimeoutNowResponse> done)
Send a timeout-now request and handle the response with done.
|
Future<com.google.protobuf.Message> |
CliClientService.transferLeader(Endpoint endpoint,
CliRequests.TransferLeaderRequest request,
RpcResponseClosure<RpcRequests.ErrorResponse> done)
Transfer leadership to other peer.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
BoltRpcClient.checkConnection(Endpoint endpoint) |
boolean |
BoltRpcClient.checkConnection(Endpoint endpoint,
boolean createIfAbsent) |
boolean |
AbstractClientService.checkConnection(Endpoint endpoint,
boolean createIfAbsent) |
void |
BoltRpcClient.closeConnection(Endpoint endpoint) |
boolean |
AbstractClientService.connect(Endpoint endpoint) |
RpcServer |
BoltRaftRpcFactory.createRpcServer(Endpoint endpoint,
RaftRpcFactory.ConfigHelper<RpcServer> helper) |
boolean |
AbstractClientService.disconnect(Endpoint endpoint) |
void |
BoltRpcClient.invokeAsync(Endpoint endpoint,
Object request,
InvokeContext ctx,
InvokeCallback callback,
long timeoutMs) |
Object |
BoltRpcClient.invokeSync(Endpoint endpoint,
Object request,
InvokeContext ctx,
long timeoutMs) |
<T extends com.google.protobuf.Message> |
AbstractClientService.invokeWithDone(Endpoint endpoint,
com.google.protobuf.Message request,
InvokeContext ctx,
RpcResponseClosure<T> done,
int timeoutMs) |
<T extends com.google.protobuf.Message> |
AbstractClientService.invokeWithDone(Endpoint endpoint,
com.google.protobuf.Message request,
InvokeContext ctx,
RpcResponseClosure<T> done,
int timeoutMs,
Executor rpcExecutor) |
<T extends com.google.protobuf.Message> |
AbstractClientService.invokeWithDone(Endpoint endpoint,
com.google.protobuf.Message request,
RpcResponseClosure<T> done,
int timeoutMs) |
<T extends com.google.protobuf.Message> |
AbstractClientService.invokeWithDone(Endpoint endpoint,
com.google.protobuf.Message request,
RpcResponseClosure<T> done,
int timeoutMs,
Executor rpcExecutor) |
boolean |
AbstractClientService.isConnected(Endpoint endpoint) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
LocalSnapshotStorage.setServerAddr(Endpoint addr) |
| 构造器和说明 |
|---|
LocalSnapshotReader(LocalSnapshotStorage snapshotStorage,
SnapshotThrottle snapshotThrottle,
Endpoint addr,
RaftOptions raftOptions,
String path) |
| 构造器和说明 |
|---|
CopySession(RaftClientService rpcService,
Scheduler timerManager,
SnapshotThrottle snapshotThrottle,
RaftOptions raftOptions,
RpcRequests.GetFileRequest.Builder rb,
Endpoint ep) |
| 限定符和类型 | 方法和说明 |
|---|---|
Endpoint |
Endpoint.copy() |
Copyright © 2021. All rights reserved.