public static class VaultService.DefaultImpls
A interface VaultService
is responsible for securely and safely persisting the current state of a vault to storage. The
vault service vends immutable snapshots of the current vault for working with: if you build a transaction based
on a vault that isn't current, be aware that it may end up being invalid if the states that were used have been
consumed by someone else first!
Note that transactions we've seen are held by the storage service, not the vault.
interface VaultService
Modifier and Type | Method and Description |
---|---|
static <T extends LinearState> |
linearHeadsOfType_(VaultService $this,
java.lang.Class<T> stateType)
Returns the linearHeads only when the type of the state would be considered an 'instanceof' the given type.
|
static void |
notify(VaultService $this,
WireTransaction tx)
Same as notifyAll but with a single transaction.
|
static java.util.Map<net.corda.core.contracts.StateRef,net.corda.core.contracts.TransactionState> |
statesForRefs(VaultService $this,
java.util.List<net.corda.core.contracts.StateRef> refs) |
static com.google.common.util.concurrent.ListenableFuture<net.corda.core.node.services.Vault.Update> |
whenConsumed(VaultService $this,
StateRef ref)
Provide a Future for when a
class StateRef is consumed, which can be very useful in building tests. |
public static <T extends LinearState> java.util.Map<net.corda.core.contracts.UniqueIdentifier,net.corda.core.contracts.StateAndRef> linearHeadsOfType_(VaultService $this, java.lang.Class<T> stateType)
Returns the linearHeads only when the type of the state would be considered an 'instanceof' the given type.
public static java.util.Map<net.corda.core.contracts.StateRef,net.corda.core.contracts.TransactionState> statesForRefs(VaultService $this, java.util.List<net.corda.core.contracts.StateRef> refs)
public static void notify(VaultService $this, WireTransaction tx)
Same as notifyAll but with a single transaction.
public static com.google.common.util.concurrent.ListenableFuture<net.corda.core.node.services.Vault.Update> whenConsumed(VaultService $this, StateRef ref)
Provide a Future for when a class StateRef
is consumed, which can be very useful in building tests.
class StateRef