Package bftsmart.tests.recovery
Class RecoveryTestServer
- java.lang.Object
-
- bftsmart.tom.server.defaultservices.DefaultSingleRecoverable
-
- bftsmart.tests.recovery.RecoveryTestServer
-
- All Implemented Interfaces:
Executable
,Recoverable
,SingleExecutable
public class RecoveryTestServer extends DefaultSingleRecoverable
-
-
Field Summary
-
Fields inherited from class bftsmart.tom.server.defaultservices.DefaultSingleRecoverable
replicaContext
-
-
Constructor Summary
Constructors Constructor Description RecoveryTestServer(int processId, int stateSize)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
appExecuteOrdered(byte[] command, MessageContext msgCtx)
Execute a batch of ordered requestsbyte[]
appExecuteUnordered(byte[] command, MessageContext msgCtx)
Execute an unordered requestbyte[]
getSnapshot()
Returns a serialized snapshot of the application statevoid
installSnapshot(byte[] state)
Given a snapshot received from the state transfer protocol, install itstatic void
main(java.lang.String[] args)
-
Methods inherited from class bftsmart.tom.server.defaultservices.DefaultSingleRecoverable
executeOrdered, executeUnordered, getState, getStateManager, noOp, Op, setClientsManager, setReplicaContext, setState
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface bftsmart.tom.server.Executable
executeUnordered, getTOMMessage
-
Methods inherited from interface bftsmart.tom.server.SingleExecutable
executeOrdered
-
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
-
appExecuteOrdered
public byte[] appExecuteOrdered(byte[] command, MessageContext msgCtx)
Description copied from class:DefaultSingleRecoverable
Execute a batch of ordered requests- Specified by:
appExecuteOrdered
in classDefaultSingleRecoverable
- Parameters:
command
- The ordered requestmsgCtx
- The context associated to each request- Returns:
- the reply for the request issued by the client
-
appExecuteUnordered
public byte[] appExecuteUnordered(byte[] command, MessageContext msgCtx)
Description copied from class:DefaultSingleRecoverable
Execute an unordered request- Specified by:
appExecuteUnordered
in classDefaultSingleRecoverable
- Parameters:
command
- The unordered requestmsgCtx
- The context associated to the request- Returns:
- the reply for the request issued by the client
-
installSnapshot
public void installSnapshot(byte[] state)
Description copied from class:DefaultSingleRecoverable
Given a snapshot received from the state transfer protocol, install it- Specified by:
installSnapshot
in classDefaultSingleRecoverable
- Parameters:
state
- The serialized snapshot
-
getSnapshot
public byte[] getSnapshot()
Description copied from class:DefaultSingleRecoverable
Returns a serialized snapshot of the application state- Specified by:
getSnapshot
in classDefaultSingleRecoverable
- Returns:
- A serialized snapshot of the application state
-
-