com.sleepycat.je.rep.elections
Class MasterValue

java.lang.Object
  extended by com.sleepycat.je.rep.impl.TextProtocol.StringFormatable
      extended by com.sleepycat.je.rep.elections.Protocol.StringValue
          extended by 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.


Field Summary
 
Fields inherited from class com.sleepycat.je.rep.impl.TextProtocol.StringFormatable
s
 
Constructor Summary
MasterValue(String valueString)
           
MasterValue(String masterHostname, int masterPort, NameIdPair masterNameIdPair)
           
 
Method Summary
 boolean equals(Object obj)
           
 String getHostName()
           
 NameIdPair getNameId()
           
 String getNodeName()
           
static Protocol.ValueParser getParser()
          Returns a parser that can convert a wire format value into a MasterValue
 int getPort()
           
 int hashCode()
           
 
Methods inherited from class com.sleepycat.je.rep.elections.Protocol.StringValue
getString, toString
 
Methods inherited from class com.sleepycat.je.rep.impl.TextProtocol.StringFormatable
init, wireFormat
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sleepycat.je.rep.impl.TextProtocol.WireFormatable
wireFormat
 

Constructor Detail

MasterValue

public MasterValue(String masterHostname,
                   int masterPort,
                   NameIdPair masterNameIdPair)

MasterValue

public MasterValue(String valueString)
Method Detail

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.