public class MasterStatus
extends java.lang.Object
implements java.lang.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.
|
java.lang.Object |
clone()
Returns a read-only snapshot of the object.
|
NameIdPair |
getGroupMasterNameId() |
java.net.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(java.net.InetSocketAddress newGroupMaster,
NameIdPair newGroupMasterNameId) |
void |
sync()
Syncs to the group master
|
void |
unSync() |
public MasterStatus(NameIdPair nameIdPair)
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean isGroupMaster()
public boolean isNodeMaster()
public void setGroupMaster(java.net.InetSocketAddress newGroupMaster, NameIdPair newGroupMasterNameId)
public boolean inSync()
public void unSync()
public void assertSync() throws MasterStatus.MasterSyncException
MasterStatus.MasterSyncException
public void sync()
public java.net.InetSocketAddress getNodeMaster()
public NameIdPair getNodeMasterNameId()
public NameIdPair getGroupMasterNameId()
Copyright (c) 2004-2012 Oracle. All rights reserved.