GoldenGateConnectionManager / com.fitbit.goldengate.stackservice / StackServiceMapper

StackServiceMapper

class StackServiceMapper<T : StackService, K : NodeKey<*>>

Retrieves a Peer from a NodeMapper for a given NodeKey and extracts the StackService with get. The NodeMapper will build a Peer with the PeerBuilder given by nodeBuilderProvider if necessary

Parameters

nodeMapper - The NodeMapper where all nodes are held

getStackService - function to extract the StackService from a given Peer

Constructors

<init>

StackServiceMapper(getStackService: (Peer<*>) -> T, peerBuilder: PeerBuilder<T, K>, nodeMapper: NodeMapper = NodeMapper.instance)

Retrieves a Peer from a NodeMapper for a given NodeKey and extracts the StackService with get. The NodeMapper will build a Peer with the PeerBuilder given by nodeBuilderProvider if necessary

Functions

get

fun get(nodeKey: K): T

Get a StackService for a given nodeKey