corda / net.corda.node.services.transactions / BFTSMaRt / Server

Server

abstract class Server : DefaultRecoverable

Maintains the commit log and executes commit commands received from the Client.

The validation logic can be specified by implementing the executeCommand method.

Constructors

<init> Server(id: Int, db: Database, tableName: String, services: ServiceHubInternal, timestampChecker: TimestampChecker)

Maintains the commit log and executes commit commands received from the Client.

Properties

commitLog val commitLog: JDBCHashMap<StateRef, ConsumingTx>
db val db: Database
id val id: Int
services val services: ServiceHubInternal
timestampChecker val timestampChecker: TimestampChecker

Functions

appExecuteBatch open fun appExecuteBatch(command: Array<ByteArray>, mcs: Array<MessageContext>): Array<ByteArray?>
appExecuteUnordered open fun appExecuteUnordered(command: ByteArray, msgCtx: MessageContext): ByteArray?
commitInputStates fun commitInputStates(states: List<StateRef>, txId: SecureHash, callerIdentity: Party): Unit
executeCommand abstract fun executeCommand(command: ByteArray): ByteArray?

Implement logic to execute the command and commit the transaction to the log. Helper methods are provided for transaction processing: commitInputStates, validateTimestamp, and sign.

getSnapshot open fun getSnapshot(): ByteArray
installSnapshot open fun installSnapshot(bytes: ByteArray): Unit
sign fun sign(bytes: ByteArray): WithKey
validateTimestamp fun validateTimestamp(t: Timestamp?): Unit

Inheritors

Server class Server : Server