public class Execution
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.concurrent.locks.ReentrantLock |
lock |
Modifier | Constructor and Description |
---|---|
protected |
Execution(ExecutionManager manager,
Consensus consensus)
Creates a new instance of Execution for Acceptor Manager
|
Modifier and Type | Method and Description |
---|---|
void |
addWritten(byte[] value)
Add a value that shall be written to the writeSet
|
Round |
createRound(ServerViewController recManager)
Creates a round associated with this execution, supposedly the next
|
void |
decided(Round round,
byte[] value)
Called by the Acceptor, to set the decided value
|
Round |
getDecisionRound()
The round at which a decision was possible to make
|
int |
getId()
This is the execution ID
|
Round |
getLastRound()
The last round of this execution
|
Consensus |
getLearner()
This is the consensus instance to which this execution works for
|
ExecutionManager |
getManager()
This is the execution manager for this execution
|
TimestampValuePair |
getQuorumWrites()
Return the value read from a Byzantine quorum of WRITES that has
previously been stored
|
Round |
getRound(int number,
boolean create,
ServerViewController controller)
Gets a round associated with this execution
|
Round |
getRound(int number,
ServerViewController controller)
Gets a round associated with this execution
|
java.util.HashSet<TimestampValuePair> |
getWriteSet() |
void |
incEts()
Increment the ETS of this replica
|
boolean |
isDecided()
Informs whether or not the execution is decided
|
void |
removeRounds(int limit)
Removes rounds greater than 'limit' from this execution
|
void |
removeWritten(byte[] value)
Remove an already writte value from writeSet
|
void |
setQuorumWrites(byte[] value)
Store the value read from a Byzantine quorum of WRITES
|
protected Execution(ExecutionManager manager, Consensus consensus)
manager
- Execution manager for this executionconsensus
- Consensus instance to which this execution works forpublic int getId()
public ExecutionManager getManager()
public Consensus getLearner()
public Round getRound(int number, ServerViewController controller)
number
- The number of the roundpublic Round getRound(int number, boolean create, ServerViewController controller)
number
- The number of the roundcreate
- if the round is to be created if not existentpublic void incEts()
public void setQuorumWrites(byte[] value)
value
- public TimestampValuePair getQuorumWrites()
public void addWritten(byte[] value)
value
- Value to write to the writeSetpublic void removeWritten(byte[] value)
value
- valor a remover do writeSetpublic java.util.HashSet<TimestampValuePair> getWriteSet()
public Round createRound(ServerViewController recManager)
public void removeRounds(int limit)
limit
- Rounds that should be kept (from 0 to 'limit')public Round getDecisionRound()
public Round getLastRound()
public boolean isDecided()
public void decided(Round round, byte[] value)
value
- The decided valueround
- The round at which a decision was made