| 程序包 | 说明 |
|---|---|
| com.alipay.sofa.jraft | |
| com.alipay.sofa.jraft.core | |
| com.alipay.sofa.jraft.util |
| 限定符和类型 | 方法和说明 |
|---|---|
ThreadId |
ReplicatorGroup.getReplicator(PeerId peer)
Get replicator id by peer, null if not found.
|
ThreadId |
ReplicatorGroup.stopAllAndFindTheNextCandidate(ConfigurationEntry conf)
Stop all the replicators except for the one that we think can be the
candidate of the next leader, which has the largest `last_log_id' among
peers in |current_conf|.
|
| 限定符和类型 | 方法和说明 |
|---|---|
List<ThreadId> |
ReplicatorGroup.listReplicators()
Returns all replicators.
|
| 限定符和类型 | 字段和说明 |
|---|---|
protected ThreadId |
Replicator.id |
| 限定符和类型 | 方法和说明 |
|---|---|
ThreadId |
ReplicatorGroupImpl.getReplicator(PeerId peer) |
static ThreadId |
Replicator.start(ReplicatorOptions opts,
RaftOptions raftOptions) |
ThreadId |
ReplicatorGroupImpl.stopAllAndFindTheNextCandidate(ConfigurationEntry conf) |
| 限定符和类型 | 方法和说明 |
|---|---|
List<ThreadId> |
ReplicatorGroupImpl.listReplicators() |
| 限定符和类型 | 方法和说明 |
|---|---|
static long |
Replicator.getLastRpcSendTimestamp(ThreadId id) |
static long |
Replicator.getNextIndex(ThreadId id) |
static boolean |
Replicator.join(ThreadId id) |
void |
Replicator.onError(ThreadId id,
Object data,
int errorCode) |
static void |
Replicator.sendHeartbeat(ThreadId id,
RpcResponseClosure<RpcRequests.AppendEntriesResponse> closure) |
static boolean |
Replicator.sendTimeoutNowAndStop(ThreadId id,
int timeoutMs) |
static boolean |
Replicator.stop(ThreadId id) |
static boolean |
Replicator.stopTransferLeadership(ThreadId id) |
static boolean |
Replicator.transferLeadership(ThreadId id,
long logIndex) |
static void |
Replicator.waitForCaughtUp(ThreadId id,
long maxMargin,
long dueTime,
CatchUpClosure done) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
ThreadId.OnError.onError(ThreadId id,
Object data,
int errorCode)
Error callback, it will be called in lock, but should take care of unlocking it.
|
Copyright © 2021. All rights reserved.