public abstract class DurabilityCoordinator extends java.lang.Object implements Recoverable, BatchExecutable
Constructor and Description |
---|
DurabilityCoordinator() |
Modifier and Type | Method and Description |
---|---|
abstract byte[][] |
appExecuteBatch(byte[][] commands,
MessageContext[] msgCtxs) |
byte[][] |
executeBatch(byte[][] commands,
MessageContext[] msgCtx)
Execute a batch of requests.
|
byte[] |
getCurrentStateHash() |
abstract byte[] |
getSnapshot() |
CSTState |
getState(CSTRequest cstRequest) |
ApplicationState |
getState(int eid,
boolean sendState)
This method should return a representation of the application state
|
StateManager |
getStateManager()
Recoverers implementing this interface will have to chose among
different options of state managers like DurableStateManager or
StandardStateManager.
|
abstract void |
installSnapshot(byte[] state) |
void |
setReplicaContext(ReplicaContext replicaContext) |
int |
setState(ApplicationState recvState)
Sets the state to the representation obtained in the state transfer protocol
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
noOp
executeUnordered
public byte[][] executeBatch(byte[][] commands, MessageContext[] msgCtx)
BatchExecutable
executeBatch
in interface BatchExecutable
public ApplicationState getState(int eid, boolean sendState)
Recoverable
getState
in interface Recoverable
eid
- Execution 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 otherwisepublic int setState(ApplicationState recvState)
Recoverable
setState
in interface Recoverable
recvState
- State obtained in the state transfer protocolpublic CSTState getState(CSTRequest cstRequest)
public void setReplicaContext(ReplicaContext replicaContext)
setReplicaContext
in interface Recoverable
public StateManager getStateManager()
Recoverable
getStateManager
in interface Recoverable
public byte[] getCurrentStateHash()
public abstract void installSnapshot(byte[] state)
public abstract byte[] getSnapshot()
public abstract byte[][] appExecuteBatch(byte[][] commands, MessageContext[] msgCtxs)