public final class DataNodeSlot extends Object implements Serializable
| 构造器和说明 |
|---|
DataNodeSlot(String dataNode)
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
DataNodeSlot |
addFollower(Collection<Integer> slotIds) |
DataNodeSlot |
addFollower(int slotId) |
DataNodeSlot |
addLeader(Collection<Integer> slotIds) |
DataNodeSlot |
addLeader(int slotId) |
static List<String> |
collectDataNodes(Collection<DataNodeSlot> dataNodeSlots) |
boolean |
containsFollower(int slotId) |
boolean |
containsLeader(int slotId) |
boolean |
equals(Object o) |
DataNodeSlot |
fork(boolean ignoreFollowers)
Fork data node slot.
|
String |
getDataNode()
Getter method for property dataNode.
|
Set<Integer> |
getFollowers()
Getter method for property followers.
|
Set<Integer> |
getLeaders()
Getter method for property leaders.
|
int |
hashCode() |
DataNodeSlot |
removeFollower(int slotId) |
DataNodeSlot |
removeLeader(int slotId) |
String |
toString() |
int |
totalSlotNum()
Total slot num int.
|
public DataNodeSlot(String dataNode)
dataNode - the data nodepublic DataNodeSlot fork(boolean ignoreFollowers)
ignoreFollowers - the ignore followerspublic DataNodeSlot addLeader(int slotId)
public DataNodeSlot addLeader(Collection<Integer> slotIds)
public DataNodeSlot removeLeader(int slotId)
public DataNodeSlot addFollower(int slotId)
public DataNodeSlot addFollower(Collection<Integer> slotIds)
public DataNodeSlot removeFollower(int slotId)
public boolean containsLeader(int slotId)
public boolean containsFollower(int slotId)
public String getDataNode()
public Set<Integer> getLeaders()
public Set<Integer> getFollowers()
public int totalSlotNum()
public static List<String> collectDataNodes(Collection<DataNodeSlot> dataNodeSlots)
Copyright © 2023 The Ant Financial. All rights reserved.