public class RaftUniquenessProvider extends SingletonSerializeAsToken implements UniquenessProvider
A uniqueness provider that records committed input states in a distributed collection replicated and persisted in a Raft cluster, using the Copycat framework (http://atomix.io/copycat/).
The uniqueness provider maintains both a Copycat cluster node (server) and a client through which it can submit requests to the cluster. In Copycat, a client request is first sent to the server it's connected to and then redirected to the cluster leader to be actioned.
Modifier and Type | Class and Description |
---|---|
static class |
RaftUniquenessProvider.Companion |
UniquenessProvider.Conflict, UniquenessProvider.ConsumingTx
Modifier and Type | Field and Description |
---|---|
static RaftUniquenessProvider.Companion |
Companion |
Constructor and Description |
---|
RaftUniquenessProvider(java.nio.file.Path storagePath,
com.google.common.net.HostAndPort myAddress,
java.util.List<com.google.common.net.HostAndPort> clusterAddresses,
org.jetbrains.exposed.sql.Database db,
SSLConfiguration config)
A uniqueness provider that records committed input states in a distributed collection replicated and
persisted in a Raft cluster, using the Copycat framework (http://atomix.io/copycat/).
|
Modifier and Type | Method and Description |
---|---|
void |
commit(java.util.List<net.corda.core.contracts.StateRef> states,
SecureHash txId,
Party callerIdentity)
Commits all input states of the given transaction
|
toToken
commit
toToken
public static RaftUniquenessProvider.Companion Companion
public RaftUniquenessProvider(java.nio.file.Path storagePath, com.google.common.net.HostAndPort myAddress, java.util.List<com.google.common.net.HostAndPort> clusterAddresses, org.jetbrains.exposed.sql.Database db, SSLConfiguration config)
A uniqueness provider that records committed input states in a distributed collection replicated and persisted in a Raft cluster, using the Copycat framework (http://atomix.io/copycat/).
The uniqueness provider maintains both a Copycat cluster node (server) and a client through which it can submit requests to the cluster. In Copycat, a client request is first sent to the server it's connected to and then redirected to the cluster leader to be actioned.
storagePath
- Directory storing the Raft log and state machine snapshotsmyAddress
- Address of the Copycat node run by this Corda nodeclusterAddresses
- List of node addresses in the existing Copycat cluster. At least one active node must be
provided to join the cluster. If empty, a new cluster will be bootstrapped.db
- The database to store the state machine state inconfig
- SSL configurationpublic void commit(java.util.List<net.corda.core.contracts.StateRef> states, SecureHash txId, Party callerIdentity)
Commits all input states of the given transaction