public final class RandomServer extends DefaultRecoverable
Constructor and Description |
---|
RandomServer(int id) |
RandomServer(int id,
boolean join) |
Modifier and Type | Method and Description |
---|---|
byte[][] |
appExecuteBatch(byte[][] commands,
MessageContext[] msgCtxs) |
byte[] |
executeOrdered(byte[] command,
MessageContext msgCtx) |
byte[] |
executeUnordered(byte[] command,
MessageContext msgCtx)
Just return the current value of the counter.
|
ServiceReplica |
getReplica() |
byte[] |
getSnapshot() |
byte[] |
getState() |
void |
installSnapshot(byte[] state) |
static void |
main(java.lang.String[] args) |
void |
setReplica(ServiceReplica replica) |
void |
setState(byte[] state) |
computeHash, executeBatch, getState, getStateManager, noOp, saveCommands, setReplicaContext, setState
public RandomServer(int id)
public RandomServer(int id, boolean join)
public ServiceReplica getReplica()
public void setReplica(ServiceReplica replica)
public byte[] executeOrdered(byte[] command, MessageContext msgCtx)
public byte[] executeUnordered(byte[] command, MessageContext msgCtx)
command
- Command to b executedmsgCtx
- Context of the message receivedpublic static void main(java.lang.String[] args)
public byte[] getState()
public void setState(byte[] state)
public void installSnapshot(byte[] state)
installSnapshot
in class DefaultRecoverable
public byte[] getSnapshot()
getSnapshot
in class DefaultRecoverable
public byte[][] appExecuteBatch(byte[][] commands, MessageContext[] msgCtxs)
appExecuteBatch
in class DefaultRecoverable