core.node.services / InMemoryNetworkMapService

# InMemoryNetworkMapService

`class InMemoryNetworkMapService : NetworkMapService, AbstractNodeService`

### Constructors

<init> | `InMemoryNetworkMapService(net: MessagingService, home: NodeRegistration, cache: NetworkMapCache)`

### Properties

cache | `val cache: NetworkMapCache`
maxSizeRegistrationRequestBytes | `val maxSizeRegistrationRequestBytes: Int` Maximum credible size for a registration request. Generally requests are around 500-600 bytes, so this gives a 10 times overhead.
maxUnacknowledgedUpdates | `val maxUnacknowledgedUpdates: Int` Maximum number of unacknowledged updates to send to a node before automatically unregistering them for updates
nodes | `val nodes: List<NodeInfo>`

### Inherited Properties

net | `val net: MessagingService`

### Functions

getUnacknowledgedCount | `fun getUnacknowledgedCount(subscriber: SingleMessageRecipient): Int?`
notifySubscribers | `fun notifySubscribers(wireReg: WireNodeRegistration): Unit`
processAcknowledge | `fun processAcknowledge(req: UpdateAcknowledge): Unit`
processFetchAllRequest | `fun processFetchAllRequest(req: FetchMapRequest): FetchMapResponse`
processQueryRequest | `fun processQueryRequest(req: QueryIdentityRequest): QueryIdentityResponse`
processRegistrationChangeRequest | `fun processRegistrationChangeRequest(req: RegistrationRequest): RegistrationResponse`
processSubscriptionRequest | `fun processSubscriptionRequest(req: SubscribeRequest): SubscribeResponse`

### Inherited Functions

addMessageHandler

`fun <Q : AbstractRequestMessage, R : Any> addMessageHandler(topic: String, handler: (Q) -> R, exceptionConsumer: (Message, Exception) -> Unit): Unit`

Register a handler for a message topic. In comparison to using net.addMessageHandler() this manages a lot of common boilerplate code. Exceptions are caught and passed to the provided consumer.

`fun <Q : AbstractRequestMessage, R : Any> addMessageHandler(topic: String, handler: (Q) -> R): Unit`

Register a handler for a message topic. In comparison to using net.addMessageHandler() this manages a lot of common boilerplate code. Exceptions are propagated to the messaging layer.