net.corda.core.node.services - corda

corda / net.corda.core.node.services

## Package net.corda.core.node.services

### Types

#### AttachmentFixup | `typealias AttachmentFixup = Pair<Set<AttachmentId>, Set<AttachmentId>>`
#### AttachmentId | `typealias AttachmentId = SecureHash`
#### AttachmentStorage | An attachment store records potentially large binary objects, identified by their hash. `interface AttachmentStorage`
#### ContractUpgradeService | The ContractUpgradeService is responsible for securely upgrading contract state objects according to a specified and mutually agreed (amongst participants) contract version. See also ContractUpgradeFlow to understand the workflow associated with contract upgrades. `interface ContractUpgradeService`
#### IdentityService | An identity service maintains a directory of parties by their associated distinguished name/public keys and thus supports lookup of a party given its key, or name. The service also manages the certificates linking confidential identities back to the well known identity. `interface IdentityService`
#### KeyManagementService | The KMS is responsible for storing and using private keys to sign things. An implementation of this may, for example, call out to a hardware security module that enforces various auditing and frequency-of-use requirements. `interface KeyManagementService`
#### NetworkMapCache | A network map contains lists of nodes on the network along with information about their identity keys, services they provide and host names or IP addresses where they can be connected to. The cache wraps around a map fetched from an authoritative service, and adds easy lookup of the data stored within it. Generally it would be initialised with a specified network map service, which it fetches data from and then subscribes to updates of. `interface NetworkMapCache : NetworkMapCacheBase`
#### NetworkMapCacheBase | Subset of NetworkMapCache that doesn't depend on an IdentityService. `interface NetworkMapCacheBase`
#### NetworkParametersService | Service for retrieving network parameters used for resolving transactions according to parameters that were historically in force in the network. `interface NetworkParametersService`
#### PartyInfo | Holds information about a Party, which may refer to either a specific node or a service. `sealed class PartyInfo`
#### ServiceLifecycleEvent | `enum class ServiceLifecycleEvent`
#### ServiceLifecycleObserver | Specifies that given CordaService is interested to know about important milestones of Corda Node lifecycle and potentially react to them. Subscription can be performed using net.corda.core.node.AppServiceHub.register method from a constructor of CordaService. `interface ServiceLifecycleObserver`
#### TelemetryService | `interface TelemetryService`
#### TimeWindowChecker | Checks if the current instant provided by the input clock falls within the provided time-window. `class TimeWindowChecker`
#### TransactionStorage | Thread-safe storage of transactions. `interface TransactionStorage`
#### Vault | A vault (name may be temporary) wraps a set of states that are useful for us to keep track of, for instance, because we own them. This class represents an immutable, stable state of a vault: it is guaranteed not to change out from underneath you, even though the canonical currently-best-known vault may change as we learn about new transactions from our peers and generate new transactions that consume states ourselves. `class Vault<out T : ContractState>`
#### VaultService | A 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! `interface VaultService`

### Annotations

#### CordaService | Annotate any class that needs to be a long-lived service within the node, such as an oracle, with this annotation. Such a class needs to have a constructor with a single parameter of type AppServiceHub. This constructor will be invoked during node start to initialise the service. The service hub provided can be used to get information about the node that may be necessary for the service. Corda services are created as singletons within the node and are available to flows via ServiceHub.cordaService. `annotation class CordaService`

### Exceptions

#### CordaServiceCriticalFailureException | Please see ServiceLifecycleEvent.STATE_MACHINE_STARTED for the purpose of this exception. `class CordaServiceCriticalFailureException : Exception`
#### StatesNotAvailableException | `class StatesNotAvailableException : FlowException`
#### UnknownAnonymousPartyException | `class UnknownAnonymousPartyException : CordaException`
#### VaultQueryException | `class VaultQueryException : FlowException`

### Properties

#### MAX_CONSTRAINT_DATA_SIZE | The maximum permissible size of contract constraint type data (for storage in vault states database table). `const val MAX_CONSTRAINT_DATA_SIZE: Int`

### Functions

#### queryBy | `fun <T : ContractState> VaultService.queryBy(): Page<T>` `fun <T : ContractState> VaultService.queryBy(criteria: QueryCriteria): Page<T>` `fun <T : ContractState> VaultService.queryBy(paging: PageSpecification): Page<T>` `fun <T : ContractState> VaultService.queryBy(criteria: QueryCriteria, paging: PageSpecification): Page<T>` `fun <T : ContractState> VaultService.queryBy(criteria: QueryCriteria, sorting: Sort): Page<T>` `fun <T : ContractState> VaultService.queryBy(criteria: QueryCriteria, paging: PageSpecification, sorting: Sort): Page<T>`
#### trackBy | `fun <T : ContractState> VaultService.trackBy(): DataFeed<Page<T>, Update<T>>` `fun <T : ContractState> VaultService.trackBy(paging: PageSpecification): DataFeed<Page<T>, Update<T>>` `fun <T : ContractState> VaultService.trackBy(criteria: QueryCriteria): DataFeed<Page<T>, Update<T>>` `fun <T : ContractState> VaultService.trackBy(criteria: QueryCriteria, paging: PageSpecification): DataFeed<Page<T>, Update<T>>` `fun <T : ContractState> VaultService.trackBy(criteria: QueryCriteria, sorting: Sort): DataFeed<Page<T>, Update<T>>` `fun <T : ContractState> VaultService.trackBy(criteria: QueryCriteria, paging: PageSpecification, sorting: Sort): DataFeed<Page<T>, Update<T>>`