public final class ThroughputLatencyServer extends java.lang.Object implements SingleExecutable, Recoverable
Constructor and Description |
---|
ThroughputLatencyServer(int id,
int interval,
int replySize,
int stateSize,
boolean context) |
Modifier and Type | Method and Description |
---|---|
byte[] |
execute(byte[] command,
MessageContext msgCtx) |
byte[] |
executeOrdered(byte[] command,
MessageContext msgCtx)
Method called to execute a request totally ordered.
|
byte[] |
executeUnordered(byte[] command,
MessageContext msgCtx)
Method called to execute a request totally ordered.
|
byte[] |
getState() |
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.
|
static void |
main(java.lang.String[] args) |
void |
setReplicaContext(ReplicaContext replicaContext) |
int |
setState(ApplicationState state)
Sets the state to the representation obtained in the state transfer protocol
|
void |
setState(byte[] state) |
public ThroughputLatencyServer(int id, int interval, int replySize, int stateSize, boolean context)
public void setReplicaContext(ReplicaContext replicaContext)
setReplicaContext
in interface Recoverable
public byte[] executeOrdered(byte[] command, MessageContext msgCtx)
SingleExecutable
executeOrdered
in interface SingleExecutable
command
- the command issue by the clientmsgCtx
- information related with the commandpublic byte[] executeUnordered(byte[] command, MessageContext msgCtx)
Executable
executeUnordered
in interface Executable
command
- the command issue by the clientmsgCtx
- information related with the commandpublic byte[] execute(byte[] command, MessageContext msgCtx)
public static void main(java.lang.String[] args)
public byte[] getState()
public void setState(byte[] state)
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 state)
Recoverable
setState
in interface Recoverable
state
- State obtained in the state transfer protocolpublic StateManager getStateManager()
Recoverable
getStateManager
in interface Recoverable