abstract class AbstractCashSelection
Pluggable interface to allow for different cash selection provider implementations
Default implementation in finance workflow module uses H2 database and a custom function within H2 to perform aggregation.
Custom implementations must implement this interface and declare their implementation in
META-INF/services/net.corda.finance.workflows.asset.selection.AbstractCashSelection
.
AbstractCashSelection(maxRetries: Int = 8, retrySleep: Int = 100, retryCap: Int = 2000)
Pluggable interface to allow for different cash selection provider implementations
Default implementation in finance workflow module uses H2 database and a custom function within H2 to perform aggregation.
Custom implementations must implement this interface and declare their implementation in
|
abstract fun executeQuery(connection: Connection, amount: <ERROR CLASS><Currency>, lockId: UUID, notary: <ERROR CLASS>?, onlyFromIssuerParties: Set<<ERROR CLASS>>, withIssuerRefs: Set<<ERROR CLASS>>, withResultSet: (ResultSet) -> Boolean): Boolean
A vendor specific query(ies) to gather Cash states that are available. |
|
abstract fun isCompatible(metadata: DatabaseMetaData): Boolean
Upon dynamically loading configured Cash Selection algorithms declared in META-INF/services this method determines whether the loaded implementation is compatible and usable with the currently loaded JDBC driver. Note: the first loaded implementation to pass this check will be used at run-time. |
|
abstract fun toString(): String |
|
fun unconsumedCashStatesForSpending(services: <ERROR CLASS>, amount: <ERROR CLASS><Currency>, onlyFromIssuerParties: Set<<ERROR CLASS>> = emptySet(), notary: <ERROR CLASS>? = null, lockId: UUID, withIssuerRefs: Set<<ERROR CLASS>> = emptySet()): List<<ERROR CLASS><<ERROR CLASS>>>
Query to gather Cash states that are available and retry if they are temporarily unavailable. |
val instance: AtomicReference<AbstractCashSelection> |
fun getInstance(metadata: () -> DatabaseMetaData): AbstractCashSelection |
class CashSelectionH2Impl : AbstractCashSelection |
|
class CashSelectionOracleImpl : AbstractCashSelection |
|
class CashSelectionPostgreSQLImpl : AbstractCashSelection |
|
class EnterpriseCashSelectionSQLServerImpl : AbstractCashSelection
SQL Server / SQL Azure |