NetworkMapCacheBase - corda

corda / net.corda.core.node.services / NetworkMapCacheBase

# NetworkMapCacheBase

`@DoNotImplement interface NetworkMapCacheBase`

Subset of NetworkMapCache that doesn't depend on an IdentityService.

### Properties

#### allNodes | Return all NodeInfos the node currently is aware of (including ourselves). `abstract val allNodes: List<NodeInfo>`
#### changed | Tracks changes to the network map cache. `abstract val changed: Observable<MapChange>`
#### nodeReady | Future to track completion of the NetworkMapService registration. `abstract val nodeReady: CordaFuture<Void?>`
#### notaryIdentities | A list of notary services available on the network. `abstract val notaryIdentities: List<Party>`

### Functions

#### clearNetworkMapCache | Clear all network map data from local node cache. `abstract fun clearNetworkMapCache(): Unit`
#### getNodeByAddress | Look up the node info for a host and port. `abstract fun getNodeByAddress(address: NetworkHostAndPort): NodeInfo?`
#### getNodeByLegalName | Return a NodeInfo which has the given legal name for one of its identities, or null if no such node is found. `abstract fun getNodeByLegalName(name: CordaX500Name): NodeInfo?`
#### getNodesByLegalIdentityKey | Look up the node information entries for a specific identity key. Note that normally there will be only one node for a key, but for clusters of nodes or distributed services there can be multiple nodes. `abstract fun getNodesByLegalIdentityKey(identityKey: PublicKey): List<NodeInfo>`
#### getNodesByLegalName | Return a list of NodeInfos which have the given legal name for one of their identities, or an empty list if no such nodes are found. `abstract fun getNodesByLegalName(name: CordaX500Name): List<NodeInfo>`
#### getNotary | Look up a well known identity of notary by legal name. `open fun getNotary(name: CordaX500Name): Party?`
#### getPartyInfo | Returns information about the party, which may be a specific node or a service `abstract fun getPartyInfo(party: Party): PartyInfo?`
#### getPeerByLegalName | Look up the well known identity of a legal name. This should be used in preference to well known identity lookup in the identity service where possible, as the network map is the authoritative source of well known identities. `open fun getPeerByLegalName(name: CordaX500Name): Party?`
#### getPeerCertificateByLegalName | Look up a well known identity (including certificate path) of a legal name. This should be used in preference to well known identity lookup in the identity service where possible, as the network map is the authoritative source of well known identities. `abstract fun getPeerCertificateByLegalName(name: CordaX500Name): PartyAndCertificate?`
#### isNotary | Returns true if and only if the given Party is a notary, which is defined by the network parameters. `abstract fun isNotary(party: Party): Boolean`
#### isValidatingNotary | Returns true if and only if the given Party is validating notary. For every party that is a validating notary, isNotary is also true. `abstract fun isValidatingNotary(party: Party): Boolean`
#### track | Atomically get the current party nodes and a stream of updates. Note that the Observable buffers updates until the first subscriber is registered so as to avoid racing with early updates. `abstract fun track(): DataFeed<List<NodeInfo>, MapChange>`

### Inheritors

#### 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`