| 程序包 | 说明 |
|---|---|
| com.alipay.sofa.jraft | |
| com.alipay.sofa.jraft.conf | |
| com.alipay.sofa.jraft.core | |
| com.alipay.sofa.jraft.storage | |
| com.alipay.sofa.jraft.storage.impl |
| 限定符和类型 | 方法和说明 |
|---|---|
PeerId |
ReplicatorGroup.findTheNextCandidate(ConfigurationEntry conf)
Find the follower with the most log entries in this group, which is
likely becomes the leader according to the election algorithm of raft.
|
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|.
|
| 限定符和类型 | 方法和说明 |
|---|---|
ConfigurationEntry |
ConfigurationManager.get(long lastIncludedIndex) |
ConfigurationEntry |
ConfigurationManager.getLastConfiguration() |
ConfigurationEntry |
ConfigurationManager.getSnapshot() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
ConfigurationManager.add(ConfigurationEntry entry)
Adds a new conf entry.
|
void |
ConfigurationManager.setSnapshot(ConfigurationEntry snapshot) |
| 限定符和类型 | 方法和说明 |
|---|---|
PeerId |
ReplicatorGroupImpl.findTheNextCandidate(ConfigurationEntry conf) |
ThreadId |
ReplicatorGroupImpl.stopAllAndFindTheNextCandidate(ConfigurationEntry conf) |
| 限定符和类型 | 方法和说明 |
|---|---|
ConfigurationEntry |
LogManager.checkAndSetConfiguration(ConfigurationEntry current)
Check if |current| should be updated to the latest configuration
Returns the latest configuration, otherwise null.
|
ConfigurationEntry |
LogManager.getConfiguration(long index)
Get the configuration at index.
|
| 限定符和类型 | 方法和说明 |
|---|---|
ConfigurationEntry |
LogManager.checkAndSetConfiguration(ConfigurationEntry current)
Check if |current| should be updated to the latest configuration
Returns the latest configuration, otherwise null.
|
| 限定符和类型 | 方法和说明 |
|---|---|
ConfigurationEntry |
LogManagerImpl.checkAndSetConfiguration(ConfigurationEntry current) |
ConfigurationEntry |
LogManagerImpl.getConfiguration(long index) |
| 限定符和类型 | 方法和说明 |
|---|---|
ConfigurationEntry |
LogManagerImpl.checkAndSetConfiguration(ConfigurationEntry current) |
Copyright © 2021. All rights reserved.