@InterfaceAudience.Private public class ServerStateNode extends Object implements Comparable<ServerStateNode>
Modifier and Type | Field and Description |
---|---|
private ReadWriteLock |
lock |
private Set<RegionStateNode> |
regions |
private ServerName |
serverName |
private ServerState |
state |
Constructor and Description |
---|
ServerStateNode(ServerName serverName) |
Modifier and Type | Method and Description |
---|---|
void |
addRegion(RegionStateNode regionNode) |
int |
compareTo(ServerStateNode other) |
boolean |
equals(Object other) |
int |
getRegionCount() |
List<RegionInfo> |
getRegionInfoList() |
ServerName |
getServerName() |
ServerState |
getState() |
List<RegionInfo> |
getSystemRegionInfoList() |
int |
hashCode() |
boolean |
isInState(ServerState... expected) |
Lock |
readLock() |
void |
removeRegion(RegionStateNode regionNode) |
(package private) void |
setState(ServerState state) |
String |
toString() |
Lock |
writeLock() |
private final Set<RegionStateNode> regions
private final ServerName serverName
private final ReadWriteLock lock
private volatile ServerState state
public ServerStateNode(ServerName serverName)
public ServerName getServerName()
public ServerState getState()
public boolean isInState(ServerState... expected)
void setState(ServerState state)
public int getRegionCount()
public List<RegionInfo> getRegionInfoList()
public List<RegionInfo> getSystemRegionInfoList()
public void addRegion(RegionStateNode regionNode)
public void removeRegion(RegionStateNode regionNode)
public int compareTo(ServerStateNode other)
compareTo
in interface Comparable<ServerStateNode>
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.