public class MasterStatus extends Object implements Cloneable
| Modifier and Type | Class and Description |
|---|---|
class |
MasterStatus.MasterSyncException |
| Constructor and Description |
|---|
MasterStatus(NameIdPair nameIdPair) |
| Modifier and Type | Method and Description |
|---|---|
void |
assertSync()
An assertion form of the above.
|
Object |
clone()
Returns a read-only snapshot of the object.
|
InetSocketAddress |
getGroupMaster()
Returns a socket that can be used to communicate with the group master.
|
NameIdPair |
getGroupMasterNameId() |
InetSocketAddress |
getNodeMaster()
Returns the Node's current idea of the Master.
|
NameIdPair |
getNodeMasterNameId() |
boolean |
inSync()
Predicate to determine whether the group and node have a consistent
notion of the Master.
|
boolean |
isGroupMaster()
Returns true if it's the master from the Group's perspective
|
boolean |
isNodeMaster()
Returns true if it's the master from the node's localized perspective
|
void |
setGroupMaster(String hostname,
int port,
NameIdPair newGroupMasterNameId) |
void |
sync()
Syncs to the group master
|
void |
unSync() |
public MasterStatus(NameIdPair nameIdPair)
public Object clone()
public boolean isGroupMaster()
public boolean isNodeMaster()
public void setGroupMaster(String hostname, int port, NameIdPair newGroupMasterNameId)
public boolean inSync()
public void unSync()
public void assertSync()
throws MasterStatus.MasterSyncException
MasterStatus.MasterSyncExceptionpublic void sync()
public InetSocketAddress getNodeMaster()
public NameIdPair getNodeMasterNameId()
public InetSocketAddress getGroupMaster()
public NameIdPair getGroupMasterNameId()
Copyright © 2024. All rights reserved.