VaultService.DefaultImpls
Keywords: net.corda.core.node.services.VaultService.DefaultImpls class
Date: 2023-09-18

net.corda.core.node.services

## Class VaultService.DefaultImpls

- net.corda.core.node.services.VaultService.DefaultImpls

- Enclosing interface:
    VaultService

      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.

  See Also:
    `interface VaultService`

- - ### Constructor Detail

    - #### DefaultImpls

          public DefaultImpls()

  - ### Method Detail

    - #### whenConsumed

          @NotNull
          public static CordaFuture<net.corda.core.node.services.Vault.Update> whenConsumed(VaultService $this,
                                                                                                     @NotNull
                                                                                                     StateRef ref)

      Provide a `interface CordaFuture` for when a `class StateRef` is consumed, which can be very useful in building tests.

      See Also:
        `interface CordaFuture`, `class StateRef`

    - #### queryBy

          @NotNull
          public static <T extends ContractState> net.corda.core.node.services.Vault.Page<T> queryBy(VaultService $this,
                                                                                                              @NotNull
                                                                                                              java.lang.Class<? extends T> contractStateType)

    - #### queryBy

          @NotNull
          public static <T extends ContractState> net.corda.core.node.services.Vault.Page<T> queryBy(VaultService $this,
                                                                                                              @NotNull
                                                                                                              java.lang.Class<? extends T> contractStateType,
                                                                                                              @NotNull
                                                                                                              QueryCriteria criteria)

    - #### queryBy

          @NotNull
          public static <T extends ContractState> net.corda.core.node.services.Vault.Page<T> queryBy(VaultService $this,
                                                                                                              @NotNull
                                                                                                              java.lang.Class<? extends T> contractStateType,
                                                                                                              @NotNull
                                                                                                              PageSpecification paging)

    - #### queryBy

          @NotNull
          public static <T extends ContractState> net.corda.core.node.services.Vault.Page<T> queryBy(VaultService $this,
                                                                                                              @NotNull
                                                                                                              java.lang.Class<? extends T> contractStateType,
                                                                                                              @NotNull
                                                                                                              QueryCriteria criteria,
                                                                                                              @NotNull
                                                                                                              PageSpecification paging)

    - #### queryBy

          @NotNull
          public static <T extends ContractState> net.corda.core.node.services.Vault.Page<T> queryBy(VaultService $this,
                                                                                                              @NotNull
                                                                                                              java.lang.Class<? extends T> contractStateType,
                                                                                                              @NotNull
                                                                                                              QueryCriteria criteria,
                                                                                                              @NotNull
                                                                                                              Sort sorting)

    - #### queryBy

          @NotNull
          public static <T extends ContractState> net.corda.core.node.services.Vault.Page<T> queryBy(VaultService $this,
                                                                                                              @NotNull
                                                                                                              java.lang.Class<? extends T> contractStateType,
                                                                                                              @NotNull
                                                                                                              QueryCriteria criteria,
                                                                                                              @NotNull
                                                                                                              PageSpecification paging,
                                                                                                              @NotNull
                                                                                                              Sort sorting)

    - #### trackBy

          @NotNull
          public static <T extends ContractState> DataFeed<net.corda.core.node.services.Vault.Page,net.corda.core.node.services.Vault.Update> trackBy(VaultService $this,
                                                                                                                                                               @NotNull
                                                                                                                                                               java.lang.Class<? extends T> contractStateType)

    - #### trackBy

          @NotNull
          public static <T extends ContractState> DataFeed<net.corda.core.node.services.Vault.Page,net.corda.core.node.services.Vault.Update> trackBy(VaultService $this,
                                                                                                                                                               @NotNull
                                                                                                                                                               java.lang.Class<? extends T> contractStateType,
                                                                                                                                                               @NotNull
                                                                                                                                                               QueryCriteria criteria)

    - #### trackBy

          @NotNull
          public static <T extends ContractState> DataFeed<net.corda.core.node.services.Vault.Page,net.corda.core.node.services.Vault.Update> trackBy(VaultService $this,
                                                                                                                                                               @NotNull
                                                                                                                                                               java.lang.Class<? extends T> contractStateType,
                                                                                                                                                               @NotNull
                                                                                                                                                               PageSpecification paging)

    - #### trackBy

          @NotNull
          public static <T extends ContractState> DataFeed<net.corda.core.node.services.Vault.Page,net.corda.core.node.services.Vault.Update> trackBy(VaultService $this,
                                                                                                                                                               @NotNull
                                                                                                                                                               java.lang.Class<? extends T> contractStateType,
                                                                                                                                                               @NotNull
                                                                                                                                                               QueryCriteria criteria,
                                                                                                                                                               @NotNull
                                                                                                                                                               PageSpecification paging)

    - #### trackBy

          @NotNull
          public static <T extends ContractState> DataFeed<net.corda.core.node.services.Vault.Page,net.corda.core.node.services.Vault.Update> trackBy(VaultService $this,
                                                                                                                                                               @NotNull
                                                                                                                                                               java.lang.Class<? extends T> contractStateType,
                                                                                                                                                               @NotNull
                                                                                                                                                               QueryCriteria criteria,
                                                                                                                                                               @NotNull
                                                                                                                                                               Sort sorting)

    - #### trackBy

          @NotNull
          public static <T extends ContractState> DataFeed<net.corda.core.node.services.Vault.Page,net.corda.core.node.services.Vault.Update> trackBy(VaultService $this,
                                                                                                                                                               @NotNull
                                                                                                                                                               java.lang.Class<? extends T> contractStateType,
                                                                                                                                                               @NotNull
                                                                                                                                                               QueryCriteria criteria,
                                                                                                                                                               @NotNull
                                                                                                                                                               PageSpecification paging,
                                                                                                                                                               @NotNull
                                                                                                                                                               Sort sorting)