universal.consensus
Class Consensus

java.lang.Object
  |
  +--universal.consensus.Consensus

public class Consensus
extends java.lang.Object

For each position in the total order the serverInterceptor instantiates a new Consensus. And then for each roundno it calls the method propose of this class.


Field Summary
 int L
          The position in the total order for which this object consensus has been created
 java.lang.Integer Li
          The same than L
 universal.consensus.register.Registry registry
          The object in which we are going to register the Outcome value (Request,Reply,Update) that has been decided for this position in the total order and also the last time it has read and write for this position.
 universal.Universal univ
          The object Universal the consensus is linked to
 
Constructor Summary
Consensus()
           
Consensus(universal.Universal uni, int L)
          Initialize the value L and uni.
 
Method Summary
 universal.Decision propose(int l, universal.Outcome prop)
          The leader propose the request, reply an update that it thinks should be for this position in the total order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

univ

public universal.Universal univ
The object Universal the consensus is linked to


L

public int L
The position in the total order for which this object consensus has been created


Li

public java.lang.Integer Li
The same than L


registry

public universal.consensus.register.Registry registry
The object in which we are going to register the Outcome value (Request,Reply,Update) that has been decided for this position in the total order and also the last time it has read and write for this position.

Constructor Detail

Consensus

public Consensus()

Consensus

public Consensus(universal.Universal uni,
                 int L)
Initialize the value L and uni. Create the object Registry for this position if it doesn't already exists. It could exist already if an other leader has already processed a request for this position which meam that we have already store something for this position in the total order.

Method Detail

propose

public universal.Decision propose(int l,
                                  universal.Outcome prop)
The leader propose the request, reply an update that it thinks should be for this position in the total order. The return of this method is either the value propose by the leader if no leader has already processed a request for this postion in the total order or the value that has already been decided for this position in the total order.