| 构造器和说明 |
|---|
DefaultSlotStats(Slot slot,
long maxSyncGap)
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o)
Equals boolean.
|
Slot |
getSlot()
Gets get slot.
|
int |
hashCode()
Hash code int.
|
boolean |
isFollowersStable()
Is followers stable boolean.
|
boolean |
isFollowerStable(String dataServer)
Is follower stable boolean.
|
boolean |
isLeaderStable()
Is leader stable boolean.
|
String |
toString()
To string string.
|
void |
updateFollowerState(FollowerSlotStatus followerSlotStatus)
Update follower state.
|
void |
updateLeaderState(LeaderSlotStatus leaderSlotStatus)
Update leader state.
|
public DefaultSlotStats(Slot slot, long maxSyncGap)
slot - the slotmaxSyncGap - maxSyncGappublic boolean isLeaderStable()
isLeaderStable 在接口中 SlotStatspublic boolean isFollowersStable()
isFollowersStable 在接口中 SlotStatspublic boolean isFollowerStable(String dataServer)
isFollowerStable 在接口中 SlotStatsdataServer - the data server
Calculate the replicate gap between leader and followers, check if it's legal Current implementation is as simple as no incremental data replication Under this circumstances, offset stands for the last successful sync task execute time
public void updateLeaderState(LeaderSlotStatus leaderSlotStatus)
updateLeaderState 在接口中 SlotStatsleaderSlotStatus - the leader slot statuspublic void updateFollowerState(FollowerSlotStatus followerSlotStatus)
updateFollowerState 在接口中 SlotStatsfollowerSlotStatus - the follower slot statuspublic boolean equals(Object o)
Copyright © 2023 The Ant Financial. All rights reserved.