public class DefaultMasterChooseStrategy
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected StateHubService |
service |
| 构造器和说明 |
|---|
DefaultMasterChooseStrategy() |
| 限定符和类型 | 方法和说明 |
|---|---|
ClusterNode |
changeMasterTo(ClusterNode node)
将 node 设置为当前节点。
|
void |
clear()
清除主从选择。
|
ClusterNode |
getMasterNode()
得到主节点
1.
|
protected StateHubService service
public ClusterNode changeMasterTo(ClusterNode node) throws java.lang.Exception
node - 目标节点java.lang.Exceptionpublic ClusterNode getMasterNode() throws java.lang.Exception
getMasterNode 在接口中 MasterNodeChooseStrategyjava.lang.Exceptionpublic void clear()
throws java.lang.Exception
MasterNodeChooseStrategyclear 在接口中 MasterNodeChooseStrategyjava.lang.Exception