public class CSTState extends java.lang.Object implements ApplicationState
Constructor and Description |
---|
CSTState(byte[] state,
byte[] hashCheckpoint,
CommandsInfo[] logLower,
byte[] hashLogLower,
CommandsInfo[] logUpper,
byte[] hashLogUpper,
int checkpointEid,
int lastEid) |
Modifier and Type | Method and Description |
---|---|
int |
getCheckpointEid() |
byte[] |
getHashCheckpoint() |
byte[] |
getHashLogLower() |
byte[] |
getHashLogUpper() |
int |
getLastEid()
The consensus of the last batch of commands which the application was given
|
CommandsInfo[] |
getLogLower() |
CommandsInfo[] |
getLogUpper() |
CommandsInfo |
getMessageBatch(int eid)
Retrieves the specified batch of messages
|
byte[] |
getSerializedState()
Byte array that must be a representation of the application state
|
byte[] |
getStateHash()
Gets an secure hash of the application state
|
boolean |
hasState()
Indicates if the sender replica had the state requested by the recovering replica
|
void |
setSerializedState(byte[] state)
Sets a byte array that must be a representation of the application state
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode
public CSTState(byte[] state, byte[] hashCheckpoint, CommandsInfo[] logLower, byte[] hashLogLower, CommandsInfo[] logUpper, byte[] hashLogUpper, int checkpointEid, int lastEid)
public boolean hasState()
ApplicationState
hasState
in interface ApplicationState
public byte[] getSerializedState()
ApplicationState
getSerializedState
in interface ApplicationState
public byte[] getStateHash()
ApplicationState
getStateHash
in interface ApplicationState
public void setSerializedState(byte[] state)
ApplicationState
setSerializedState
in interface ApplicationState
state
- a byte array that must be a representation of the application statepublic int getLastEid()
ApplicationState
getLastEid
in interface ApplicationState
public int getCheckpointEid()
public CommandsInfo getMessageBatch(int eid)
eid
- Execution ID associated with the batch to be fetchedpublic byte[] getHashLogUpper()
public byte[] getHashLogLower()
public CommandsInfo[] getLogUpper()
public CommandsInfo[] getLogLower()
public byte[] getHashCheckpoint()