GoldenGateConnectionManager / com.fitbit.goldengate.node / NodeMapper

NodeMapper

class NodeMapper

Maps a NodeKey to a Node. Uses a PeerBuilder to make the node if it does not exist or if the existing Node is different than expected

Parameters

nodeMap - a MutableMap mapping a NodeKey to a Node

Functions

get

fun <T : StackService, K : NodeKey<*>> get(nodeKey: K, peerBuilder: PeerBuilder<T, K>, forceRebuild: Boolean = false): Peer<*>

Tries to retrieve an existing Node with a NodeKey or builds one with the given PeerBuilder if it does not exist or the PeerBuilder does not build it.

removeNode

fun <K : NodeKey<*>> removeNode(nodeKey: K): Unit

Removes a Node from the map that has the specific NodeKey, this needs to be called when we close a Node as the existing one will be unusable

Companion Object Properties

instance

val instance: NodeMapper