net.corda.node.services.transactions

## Class BFTSmartUniquenessProvider

- net.corda.node.services.transactions.BFTSmartUniquenessProvider

- All Implemented Interfaces:
    UniquenessProvider

      public class BFTSmartUniquenessProvider
      implements UniquenessProvider

  A `interface UniquenessProvider` based on the bft-smart library.

  Experimental, not ready for production yet.

  A `class BFTSmartUniquenessProvider` starts a `class BFTSmartServer` that joins the notary cluster and stores committed input states and a `class BFTSmartClient` to commit states to the notary cluster.

  See Also:
    `interface UniquenessProvider`, bft-smart library, `class BFTSmartUniquenessProvider`, `class BFTSmartServer`, `class BFTSmartClient`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `BFTSmartUniquenessProvider.Companion`

    - ### Nested classes/interfaces inherited from interface net.corda.core.node.services.UniquenessProvider

      `UniquenessProvider.Conflict, UniquenessProvider.ConsumingTx`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static BFTSmartUniquenessProvider.Companion` | `Companion`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BFTSmartUniquenessProvider(com.google.common.net.HostAndPort myAddress, java.util.List<com.google.common.net.HostAndPort> clusterAddresses, org.jetbrains.exposed.sql.Database db)` A `interface UniquenessProvider` based on the bft-smart library.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `commit(java.util.List<net.corda.core.contracts.StateRef> states, SecureHash txId, Party callerIdentity)` Throws UniquenessException if conflict is detected
    `java.util.List<com.google.common.net.HostAndPort>` | `getClusterAddresses()`
    `org.jetbrains.exposed.sql.Database` | `getDb()`
    `com.google.common.net.HostAndPort` | `getMyAddress()`

    - ### Methods inherited from interface net.corda.core.node.services.UniquenessProvider

      `commit`

- - ### Field Detail

    - #### Companion

          public static BFTSmartUniquenessProvider.Companion Companion

  - ### Constructor Detail

    - #### BFTSmartUniquenessProvider

          public BFTSmartUniquenessProvider(com.google.common.net.HostAndPort myAddress,
                                            java.util.List<com.google.common.net.HostAndPort> clusterAddresses,
                                            org.jetbrains.exposed.sql.Database db)

      A `interface UniquenessProvider` based on the bft-smart library.

      Experimental, not ready for production yet.

      A `class BFTSmartUniquenessProvider` starts a `class BFTSmartServer` that joins the notary cluster and stores committed input states and a `class BFTSmartClient` to commit states to the notary cluster.

      Parameters:
        `clusterAddresses` - the addresses of all BFTSmartUniquenessProviders of the notary cluster
        `myAddress` - the address of this uniqueness provider, must be listed in clusterAddresses
      See Also:
        `interface UniquenessProvider`, bft-smart library, `class BFTSmartUniquenessProvider`, `class BFTSmartServer`, `class BFTSmartClient`

  - ### Method Detail

    - #### commit

          public void commit(java.util.List<net.corda.core.contracts.StateRef> states,
                             SecureHash txId,
                             Party callerIdentity)

      Throws UniquenessException if conflict is detected

    - #### getMyAddress

          public com.google.common.net.HostAndPort getMyAddress()

    - #### getClusterAddresses

          public java.util.List<com.google.common.net.HostAndPort> getClusterAddresses()

    - #### getDb

          public org.jetbrains.exposed.sql.Database getDb()