public class AbstractNetworkMapService extends AbstractNodeService implements NetworkMapService
Abstracted out core functionality as the basis for a persistent implementation, as well as existing in-memory implementation.
Design is slightly refactored to track time and map version of last acknowledge per subscriber to facilitate subscriber clean up and is simpler to persist than the previous implementation based on a set of missing messages acks.
NetworkMapService.Companion, NetworkMapService.FetchMapRequest, NetworkMapService.FetchMapResponse, NetworkMapService.QueryIdentityRequest, NetworkMapService.QueryIdentityResponse, NetworkMapService.RegistrationRequest, NetworkMapService.RegistrationResponse, NetworkMapService.SubscribeRequest, NetworkMapService.SubscribeResponse, NetworkMapService.Update, NetworkMapService.UpdateAcknowledge
Companion
Constructor and Description |
---|
AbstractNetworkMapService(ServiceHubInternal services)
Abstracted out core functionality as the basis for a persistent implementation, as well as existing in-memory implementation.
|
getNet, getServices
toToken
getNodes
toToken
public AbstractNetworkMapService(ServiceHubInternal services)
Abstracted out core functionality as the basis for a persistent implementation, as well as existing in-memory implementation.
Design is slightly refactored to track time and map version of last acknowledge per subscriber to facilitate subscriber clean up and is simpler to persist than the previous implementation based on a set of missing messages acks.
public java.util.Map<net.corda.core.crypto.Party,net.corda.node.services.network.NodeRegistrationInfo> getRegisteredNodes()
public ThreadBox<java.util.Map> getSubscribers()
public java.util.concurrent.atomic.AtomicInteger get_mapVersion()
public int getMapVersion()
public int getMaxUnacknowledgedUpdates()
Maximum number of unacknowledged updates to send to a node before automatically unregistering them for updates
public int getMaxSizeRegistrationRequestBytes()
Maximum credible size for a registration request. Generally requests are around 500-600 bytes, so this gives a 10 times overhead.
public java.util.List<net.corda.core.node.NodeInfo> getNodes()
public void setup()
public void unregisterNetworkHandlers()
public java.lang.Integer getUnacknowledgedCount(SingleMessageRecipient subscriber, int mapVersion)
public void notifySubscribers(WireNodeRegistration wireReg, int mapVersion)
public void processAcknowledge(NetworkMapService.UpdateAcknowledge req)
public NetworkMapService.FetchMapResponse processFetchAllRequest(NetworkMapService.FetchMapRequest req)
public NetworkMapService.QueryIdentityResponse processQueryRequest(NetworkMapService.QueryIdentityRequest req)
public NetworkMapService.RegistrationResponse processRegistrationChangeRequest(NetworkMapService.RegistrationRequest req)
public NetworkMapService.SubscribeResponse processSubscriptionRequest(NetworkMapService.SubscribeRequest req)