com.sleepycat.je.rep.elections
Class Protocol.Promise

java.lang.Object
  extended by com.sleepycat.je.rep.impl.TextProtocol.Message
      extended by com.sleepycat.je.rep.impl.TextProtocol.ResponseMessage
          extended by com.sleepycat.je.rep.elections.Protocol.Promise
All Implemented Interfaces:
TextProtocol.WireFormatable
Enclosing class:
Protocol

public class Protocol.Promise
extends TextProtocol.ResponseMessage

Promise response message. It's sent in response to a Propose message.


Constructor Summary
Protocol.Promise(Proposer.Proposal highestProposal, Protocol.Value value, Protocol.Value suggestion, long suggestionWeight, int priority)
           
Protocol.Promise(String responseLine, String[] tokens)
           
 
Method Summary
 boolean equals(Object obj)
           
(package private)  Protocol.Value getAcceptedValue()
           
(package private)  Proposer.Proposal getHighestProposal()
           
 TextProtocol.MessageOp getOp()
           
(package private)  int getPriority()
           
(package private)  Protocol.Value getSuggestion()
           
(package private)  long getSuggestionRanking()
           
 int hashCode()
           
 String wireFormat()
           
 
Methods inherited from class com.sleepycat.je.rep.impl.TextProtocol.ResponseMessage
wireFormatPrefix
 
Methods inherited from class com.sleepycat.je.rep.impl.TextProtocol.Message
getCurrentTokenPosition, getMessagePrefix, getProtocol, getSenderId, nextPayloadToken
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Protocol.Promise

public Protocol.Promise(Proposer.Proposal highestProposal,
                        Protocol.Value value,
                        Protocol.Value suggestion,
                        long suggestionWeight,
                        int priority)

Protocol.Promise

public Protocol.Promise(String responseLine,
                        String[] tokens)
                 throws TextProtocol.InvalidMessageException
Throws:
TextProtocol.InvalidMessageException
Method Detail

getOp

public TextProtocol.MessageOp getOp()
Specified by:
getOp in class TextProtocol.Message

hashCode

public int hashCode()
Overrides:
hashCode in class TextProtocol.ResponseMessage

equals

public boolean equals(Object obj)
Overrides:
equals in class TextProtocol.ResponseMessage

wireFormat

public String wireFormat()

getHighestProposal

Proposer.Proposal getHighestProposal()

getAcceptedValue

Protocol.Value getAcceptedValue()

getSuggestion

Protocol.Value getSuggestion()

getSuggestionRanking

long getSuggestionRanking()

getPriority

int getPriority()


Copyright (c) 2004-2010 Oracle. All rights reserved.