public static class BFTSMaRt.Server
Maintains the commit log and executes commit commands received from the class BFTSMaRt.Client
.
The validation logic can be specified by implementing the executeCommand method.
class BFTSMaRt.Client
Modifier and Type | Class and Description |
---|---|
static class |
Server.Companion |
Modifier and Type | Field and Description |
---|---|
static Server.Companion |
Companion |
Constructor and Description |
---|
Server(int id,
org.jetbrains.exposed.sql.Database db,
java.lang.String tableName,
ServiceHubInternal services,
TimestampChecker timestampChecker)
Maintains the commit log and executes commit commands received from the
class BFTSMaRt.Client . |
Modifier and Type | Method and Description |
---|---|
byte[] |
appExecuteBatch(byte[] command,
bftsmart.tom.MessageContext[] mcs) |
byte[] |
appExecuteUnordered(byte[] command,
bftsmart.tom.MessageContext msgCtx) |
void |
commitInputStates(java.util.List<net.corda.core.contracts.StateRef> states,
SecureHash txId,
Party callerIdentity) |
byte[] |
executeCommand(byte[] command)
Implement logic to execute the command and commit the transaction to the log.
Helper methods are provided for transaction processing: commitInputStates,
BFTSMaRt.Server.validateTimestamp , and sign. |
JDBCHashMap<net.corda.core.contracts.StateRef,net.corda.core.node.services.UniquenessProvider.ConsumingTx> |
getCommitLog() |
org.jetbrains.exposed.sql.Database |
getDb() |
int |
getId() |
ServiceHubInternal |
getServices() |
byte[] |
getSnapshot() |
TimestampChecker |
getTimestampChecker() |
void |
installSnapshot(byte[] bytes) |
DigitalSignature.WithKey |
sign(byte[] bytes) |
void |
validateTimestamp(Timestamp t) |
public static Server.Companion Companion
public Server(int id, org.jetbrains.exposed.sql.Database db, java.lang.String tableName, ServiceHubInternal services, TimestampChecker timestampChecker)
Maintains the commit log and executes commit commands received from the class BFTSMaRt.Client
.
The validation logic can be specified by implementing the executeCommand method.
class BFTSMaRt.Client
public JDBCHashMap<net.corda.core.contracts.StateRef,net.corda.core.node.services.UniquenessProvider.ConsumingTx> getCommitLog()
public byte[] appExecuteUnordered(byte[] command, bftsmart.tom.MessageContext msgCtx)
public byte[] appExecuteBatch(byte[] command, bftsmart.tom.MessageContext[] mcs)
public byte[] executeCommand(byte[] command)
Implement logic to execute the command and commit the transaction to the log.
Helper methods are provided for transaction processing: commitInputStates, BFTSMaRt.Server.validateTimestamp
, and sign.
BFTSMaRt.Server.validateTimestamp
public void commitInputStates(java.util.List<net.corda.core.contracts.StateRef> states, SecureHash txId, Party callerIdentity)
public void validateTimestamp(Timestamp t)
public DigitalSignature.WithKey sign(byte[] bytes)
public byte[] getSnapshot()
public void installSnapshot(byte[] bytes)
public int getId()
public org.jetbrains.exposed.sql.Database getDb()
public ServiceHubInternal getServices()
public TimestampChecker getTimestampChecker()