public interface Recoverable
Modifier and Type | Method and Description |
---|---|
bftsmart.statemanagement.ApplicationState |
getState(int cid,
boolean sendState)
This method should return a representation of the application state
|
bftsmart.statemanagement.StateManager |
getStateManager()
Recoverers implementing this interface will have to chose among
different options of state managers like DurableStateManager or
StandardStateManager.
|
void |
noOp(int CID,
MessageContext msgCtx)
This method is invoked by ServiceReplica to indicate that a consensus instance
finished without delivering anything to the application (e.g., an instance
only decided a single reconfiguration operation.
|
void |
Op(int CID,
byte[] requests,
MessageContext msgCtx)
This method is invoked by ServiceReplica to pass information that was
decided in a particular consensus instance.
|
void |
setReplicaContext(ReplicaContext replicaContext) |
int |
setState(bftsmart.statemanagement.ApplicationState state)
Sets the state to the representation obtained in the state transfer protocol
|
void setReplicaContext(ReplicaContext replicaContext)
bftsmart.statemanagement.ApplicationState getState(int cid, boolean sendState)
cid
- Consensus up to which the application should return an Application statesendState
- true if the replica should send a complete
representation of the state instead of only the hash. False otherwiseint setState(bftsmart.statemanagement.ApplicationState state)
state
- State obtained in the state transfer protocolbftsmart.statemanagement.StateManager getStateManager()
void Op(int CID, byte[] requests, MessageContext msgCtx)
CID
- the consensus instance ID associated with the requestrequests
- A request decided in CIDmsgCtx
- Message context associated with the client request and the consensus instance
where it was ordered. msgCtx.getConsensusId() will be equal to CID.void noOp(int CID, MessageContext msgCtx)
CID
- the consensus instance where the aforementioned condition occurredmsgCtx
- Message context associated with the consensus instance. furthermore
msgCtx.getConsensusId() will be equal to CID.