com.sleepycat.je.rep.elections
Class MasterValue
java.lang.Object
com.sleepycat.je.rep.impl.TextProtocol.StringFormatable
com.sleepycat.je.rep.elections.Protocol.StringValue
com.sleepycat.je.rep.elections.MasterValue
- All Implemented Interfaces:
- Protocol.Value, TextProtocol.WireFormatable
public class MasterValue
- extends Protocol.StringValue
Class represents the identity of a Master as a subclass of a StringValue
that can be used during the election protocol.
MasterValue
public MasterValue(String masterHostname,
int masterPort,
NameIdPair masterNameIdPair)
MasterValue
public MasterValue(String valueString)
getHostName
public String getHostName()
getPort
public int getPort()
getNodeName
public String getNodeName()
getNameId
public NameIdPair getNameId()
getParser
public static Protocol.ValueParser getParser()
- Returns a parser that can convert a wire format value into a MasterValue
- Returns:
- the value parser
hashCode
public int hashCode()
- Overrides:
hashCode
in class TextProtocol.StringFormatable
equals
public boolean equals(Object obj)
- Overrides:
equals
in class TextProtocol.StringFormatable
Copyright (c) 2004-2012 Oracle. All rights reserved.