public class Round
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
TOMMessage[] |
deserializedPropValue |
java.util.HashSet<PaxosMessage> |
proof |
byte[] |
propValue |
byte[] |
propValueHash |
Modifier and Type | Method and Description |
---|---|
void |
addFreeze(int acceptor)
Establishes that a replica locally freezed this round
|
void |
addToProof(PaxosMessage pm) |
void |
clear()
Clear all round info.
|
void |
collect()
Establishes that a collect message for this round was already sent
|
int |
countFreeze()
Retrieves the ammount of replicas that locally freezed this round
|
int |
countStrong(byte[] value)
Retrives the ammount of replicas from which this process strongly accepted a specified value
|
int |
countWeak(byte[] value)
Retrives the ammount of replicas from which this process weakly accepted a specified value
|
boolean |
equals(java.lang.Object o) |
void |
freeze()
Establishes that this round is frozen
|
Execution |
getExecution()
Retrieves this round's execution
|
int |
getNumber()
Retrieves this round's number
|
java.util.Set<PaxosMessage> |
getProof() |
byte[][] |
getStrong()
Retrives all strongly accepted values from all replicas
|
byte[] |
getStrong(int acceptor)
Retrives the strongly accepted value from the specified replica
|
byte[][] |
getWeak()
Retrives all weakly accepted value from all replicas
|
byte[] |
getWeak(int acceptor)
Retrives the weakly accepted value from the specified replica
|
boolean |
isCollected()
Indicates if a collect message for this round was already sent
|
boolean |
isFrozen()
Indicates if this round is frozen
|
boolean |
isRemoved()
Informs if this round was removed from its execution
|
boolean |
isStrongSetted(int acceptor)
Informs if there is a strongly accepted value from a replica
|
boolean |
isWeakSetted(int acceptor)
Informs if there is a weakly accepted value from a replica
|
void |
setRemoved()
Set this round as removed from its execution
|
void |
setStrong(int acceptor,
byte[] value)
Sets the strongly accepted value from the specified replica
|
void |
setWeak(int acceptor,
byte[] value)
Sets the weakly accepted value from the specified replica
|
java.lang.String |
toString()
Print round information.
|
public byte[] propValue
public TOMMessage[] deserializedPropValue
public byte[] propValueHash
public java.util.HashSet<PaxosMessage> proof
public void setRemoved()
public boolean isRemoved()
public void addToProof(PaxosMessage pm)
public java.util.Set<PaxosMessage> getProof()
public int getNumber()
public Execution getExecution()
public boolean isWeakSetted(int acceptor)
acceptor
- The replica IDpublic boolean isStrongSetted(int acceptor)
acceptor
- The replica IDpublic byte[] getWeak(int acceptor)
acceptor
- The replica IDpublic byte[][] getWeak()
public void setWeak(int acceptor, byte[] value)
acceptor
- The replica IDvalue
- The value weakly accepted from the specified replicapublic byte[] getStrong(int acceptor)
acceptor
- The replica IDpublic byte[][] getStrong()
public void setStrong(int acceptor, byte[] value)
acceptor
- The replica IDvalue
- The value strongly accepted from the specified replicapublic boolean isCollected()
public void collect()
public boolean isFrozen()
public void freeze()
public void addFreeze(int acceptor)
acceptor
- replica that locally freezed this roundpublic int countFreeze()
public int countWeak(byte[] value)
value
- The value in questionpublic int countStrong(byte[] value)
value
- The value in questionpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public void clear()