@DoNotImplement public NetworkMapCacheBase
Subset of interface NetworkMapCache
that doesn't depend on an interface IdentityService
.
@NotNull java.util.List<net.corda.core.identity.Party> getNotaryIdentities()
A list of notary services available on the network.
Note that the identities are sorted based on legal name, and the ordering might change once new notaries are introduced.
@NotNull rx.Observable<net.corda.core.node.services.NetworkMapCache.MapChange> getChanged()
Tracks changes to the network map cache.
@NotNull CordaFuture<java.lang.Void> getNodeReady()
Future to track completion of the NetworkMapService registration.
@NotNull DataFeed<java.util.List,net.corda.core.node.services.NetworkMapCache.MapChange> 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.
@Nullable NodeInfo getNodeByLegalName(@NotNull CordaX500Name name)
Return a class NodeInfo
which has the given legal name for one of its identities, or null if no such node is found.
IllegalArgumentException
- If more than one matching node is found, in the case of a distributed service identity
(such as with a notary cluster). For such a scenerio use getNodesByLegalName
instead.class NodeInfo
@NotNull java.util.List<net.corda.core.node.NodeInfo> getNodesByLegalName(@NotNull CordaX500Name name)
Return a list of class NodeInfo
s which have the given legal name for one of their identities, or an empty list if no
such nodes are found.
Normally there is at most one node for a legal name, but for distributed service identities (such as with a notary cluster) there can be multiple nodes sharing the same identity.
class NodeInfo
@Nullable NodeInfo getNodeByAddress(@NotNull NetworkHostAndPort address)
Look up the node info for a host and port.
@Nullable PartyAndCertificate getPeerCertificateByLegalName(@NotNull CordaX500Name name)
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.
@Nullable Party getPeerByLegalName(@NotNull CordaX500Name name)
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.
@NotNull java.util.List<net.corda.core.node.NodeInfo> getAllNodes()
Return all class NodeInfo
s the node currently is aware of (including ourselves).
class NodeInfo
@NotNull java.util.List<net.corda.core.node.NodeInfo> getNodesByLegalIdentityKey(@NotNull java.security.PublicKey identityKey)
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.
@Nullable PartyInfo getPartyInfo(@NotNull Party party)
Returns information about the party, which may be a specific node or a service
@Nullable Party getNotary(@NotNull CordaX500Name name)
Look up a well known identity of notary by legal name.
boolean isNotary(@NotNull Party party)
Returns true if and only if the given class Party
is a notary, which is defined by the network parameters.
class Party
boolean isValidatingNotary(@NotNull Party party)
Returns true if and only if the given class Party
is validating notary. For every party that is a validating notary,
isNotary
is also true.
class Party
,
isNotary
,
isNotary
void clearNetworkMapCache()
Clear all network map data from local node cache.