Class ThroughputLatencyServer

    • Constructor Detail

      • ThroughputLatencyServer

        public ThroughputLatencyServer​(int id,
                                       int interval,
                                       int replySize,
                                       int stateSize,
                                       boolean context,
                                       int signed,
                                       int write)
    • Method Detail

      • appExecuteBatch

        public byte[][] appExecuteBatch​(byte[][] commands,
                                        MessageContext[] msgCtxs,
                                        boolean fromConsensus)
        Description copied from class: DefaultRecoverable
        Execute a batch of ordered requests
        Specified by:
        appExecuteBatch in class DefaultRecoverable
        Parameters:
        commands - The batch of requests
        msgCtxs - The context associated to each request
        fromConsensus - true if the request arrived from a consensus execution, false if it arrives from the state transfer protocol
        Returns:
        the respective replies for each request
      • appExecuteUnordered

        public byte[] appExecuteUnordered​(byte[] command,
                                          MessageContext msgCtx)
        Description copied from class: DefaultRecoverable
        Execute an unordered request
        Specified by:
        appExecuteUnordered in class DefaultRecoverable
        Parameters:
        command - The unordered request
        msgCtx - The context associated to the request
        Returns:
        the reply for the request issued by the client
      • execute

        public byte[] execute​(byte[] command,
                              MessageContext msgCtx)
      • main

        public static void main​(java.lang.String[] args)
      • installSnapshot

        public void installSnapshot​(byte[] state)
        Description copied from class: DefaultRecoverable
        Given a snapshot received from the state transfer protocol, install it
        Specified by:
        installSnapshot in class DefaultRecoverable
        Parameters:
        state - The serialized snapshot
      • getSnapshot

        public byte[] getSnapshot()
        Description copied from class: DefaultRecoverable
        Returns a serialized snapshot of the application state
        Specified by:
        getSnapshot in class DefaultRecoverable
        Returns:
        A serialized snapshot of the application state