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 |
setReplicaContext(ReplicaContext replicaContext) |
void |
setState(byte[] state) |
computeHash, executeBatch, getState, getStateManager, saveCommands, setStatepublic RandomServer(int id)
public RandomServer(int id,
boolean join)
public ServiceReplica getReplica()
public void setReplica(ServiceReplica replica)
public void setReplicaContext(ReplicaContext replicaContext)
setReplicaContext in interface RecoverablesetReplicaContext in class DefaultRecoverablepublic 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 DefaultRecoverablepublic byte[] getSnapshot()
getSnapshot in class DefaultRecoverablepublic byte[][] appExecuteBatch(byte[][] commands,
MessageContext[] msgCtxs)
appExecuteBatch in class DefaultRecoverable