vaultTrackBy

abstract fun <T : ContractState> vaultTrackBy(criteria: QueryCriteria, paging: PageSpecification, sorting: Sort, contractStateType: Class<out T>): DataFeed<Vault.Page<T>, Vault.Update<T>>

Returns a snapshot (as per queryBy) and an observable of future updates to the vault for the given query criteria.

Generic vault query function which takes a QueryCriteria object to define filters, optional PageSpecification and optional Sort modification criteria (default unsorted), and returns a DataFeed object containing

  1. a snapshot as a Vault.Page (described previously in CordaRPCOps.vaultQueryBy)

  2. an Observable of Vault.Update

Notes: the snapshot part of the query adheres to the same behaviour as the CordaRPCOps.vaultQueryBy function. the QueryCriteria applies to both snapshot and deltas (streaming updates).