infoservice.agreement.paxos.integration
Class PaxosRejectManager

java.lang.Object
  extended by infoservice.agreement.paxos.PaxosObject
      extended by infoservice.agreement.paxos.integration.PaxosRejectManager

public class PaxosRejectManager
extends PaxosObject


Field Summary
private  PaxosInstance m_paxosInstance
           
private  java.util.Hashtable m_rejectCount
           
private  java.util.Hashtable m_rejectMessages
           
 
Constructor Summary
PaxosRejectManager(PaxosInstance a_paxosInstance)
          Creates a new RejectManager for the given PaxosInstance
 
Method Summary
 boolean addRejectMessage(PaxosMessage a_msg)
          Handles an incomming RejectMessage
 java.lang.String getMajorityReject()
          Returns the majorities lastCommonRandom if it exists, otherwise null
 int getRejectMessageCount()
          Returns the number of received RejectMessages
 boolean isMajorityPossible()
          Indicates if a majority of RejectMessages for some new roundnumber is still possible
 
Methods inherited from class infoservice.agreement.paxos.PaxosObject
debug, error, fatal, getLog, info, setLog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_paxosInstance

private PaxosInstance m_paxosInstance

m_rejectMessages

private java.util.Hashtable m_rejectMessages

m_rejectCount

private java.util.Hashtable m_rejectCount
Constructor Detail

PaxosRejectManager

public PaxosRejectManager(PaxosInstance a_paxosInstance)
Creates a new RejectManager for the given PaxosInstance

Parameters:
a_paxosInstance -
Method Detail

addRejectMessage

public boolean addRejectMessage(PaxosMessage a_msg)
Handles an incomming RejectMessage

Parameters:
a_msg - The message to be handled
Returns:
true if the message has been added, false otherwise

getRejectMessageCount

public int getRejectMessageCount()
Returns the number of received RejectMessages

Returns:
The number of received RejectMessages

isMajorityPossible

public boolean isMajorityPossible()
Indicates if a majority of RejectMessages for some new roundnumber is still possible

Returns:
true if a majority of RejectMessages for some new roundnumber is still possible, false otherwise

getMajorityReject

public java.lang.String getMajorityReject()
Returns the majorities lastCommonRandom if it exists, otherwise null

Returns:
The majorities lastCommonRandom if it exists, otherwise null