|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infoservice.agreement.paxos.PaxosObject infoservice.agreement.paxos.PaxosExecution
public class PaxosExecution
Field Summary | |
---|---|
private boolean |
m_decided
Indicator if this execution has been decided |
private java.lang.String |
m_initiator
The identifier for this execution |
private PaxosInstance |
m_paxosInstance
The PaxosInstance this execution belongs to |
private java.util.Vector |
m_roundLeaders
|
private java.util.Hashtable |
m_rounds
A Hashtable of all active rounds for this execution |
Constructor Summary | |
---|---|
PaxosExecution(PaxosInstance a_instance,
java.lang.String a_initiator,
java.util.Vector a_roundLeaders)
Creates a new PaxosExecution within the given PaxosInstance for the given initiator. |
Method Summary | |
---|---|
void |
cancel()
Aborts all active rounds |
PaxosRound |
createRound()
Creates a PaxosRound with round number 0 |
PaxosRound |
createRound(int a_round)
Creates and returns a new PaxosRound with the given round number |
void |
decide(java.lang.String a_proposal)
Decides the given proposal for this execution |
java.lang.String |
getGoodProposal(int a_nextRound)
Returns a "good" (see Paxos at War) proposal for this execution A proposal is p good if a) There is no pending decission, i.e. |
java.lang.String |
getInitiator()
Returns this executions initiators id |
java.lang.String |
getNextRoundLeader(int a_round)
Returns the ID of the next rounds leader. |
PaxosInstance |
getPaxosInstance()
Returns the PaxosInstance this execution belongs to |
PaxosRound |
getRound(int a_round)
Returns the round with the given round number or null if there is no such round exists |
boolean |
isDecided()
Indicates if this execution has been decided |
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 |
---|
private java.lang.String m_initiator
private java.util.Hashtable m_rounds
private PaxosInstance m_paxosInstance
private java.util.Vector m_roundLeaders
private boolean m_decided
Constructor Detail |
---|
public PaxosExecution(PaxosInstance a_instance, java.lang.String a_initiator, java.util.Vector a_roundLeaders)
a_instance
- The instance to which the Execution belongsa_initiator
- The initiator of this executionMethod Detail |
---|
public PaxosRound getRound(int a_round)
a_round
- The round number
public PaxosRound createRound(int a_round)
a_round
- The number of the newly created round
public PaxosRound createRound()
public java.lang.String getInitiator()
public PaxosInstance getPaxosInstance()
public void cancel()
public void decide(java.lang.String a_proposal)
proposal
- The proposal that will be decidedpublic boolean isDecided()
public java.lang.String getNextRoundLeader(int a_round)
a_round
- The round number of the current round
public java.lang.String getGoodProposal(int a_nextRound)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |