public class DurableStateLog extends StateLog
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_DIR |
| Constructor and Description |
|---|
DurableStateLog(int id,
byte[] initialState,
byte[] initialHash,
boolean isToLog,
boolean syncLog,
boolean syncCkp) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessageBatch(byte[][] commands,
int round,
int leader)
Adds a message batch to the log.
|
CSTState |
getState(CSTRequest cstRequest) |
void |
newCheckpoint(byte[] state,
byte[] stateHash)
Sets the state associated with the last checkpoint, and updates the execution ID associated with it
|
void |
setLastEid(int eid,
int checkpointPeriod,
int checkpointPortion) |
void |
transferApplicationState(java.nio.channels.SocketChannel sChannel,
int eid) |
void |
update(CSTState state)
Updates this log, according to the information contained in the
TransferableState object
|
getApplicationState, getLastCheckpointEid, getLastCheckpointLeader, getLastCheckpointRound, getLastEid, getMessageBatch, getMessageBatches, getNumBatches, getState, getStateHash, setLastCheckpointEid, setLastCheckpointLeader, setLastCheckpointRound, setLastEid, updatepublic DurableStateLog(int id,
byte[] initialState,
byte[] initialHash,
boolean isToLog,
boolean syncLog,
boolean syncCkp)
public void addMessageBatch(byte[][] commands,
int round,
int leader)
addMessageBatch in class StateLogbatch - The batch of messages to be kept.public void newCheckpoint(byte[] state,
byte[] stateHash)
StateLognewCheckpoint in class StateLogstate - State associated with the last checkpointpublic CSTState getState(CSTRequest cstRequest)
public void transferApplicationState(java.nio.channels.SocketChannel sChannel,
int eid)
public void setLastEid(int eid,
int checkpointPeriod,
int checkpointPortion)
public void update(CSTState state)
transState - TransferableState object containing the information which is
used to updated this log