ENT-1618: added support for RPC client in HA mode(automatic failover) (#706)

* ENT-1618: added support for RPC client in HA mode(automatic failover)

* RPCClient: renamed variables to avoid confusion about clustering
This commit is contained in:
bpaunescu
2018-04-10 12:38:37 +01:00
committed by GitHub
parent 4ed917436a
commit f022c67689
4 changed files with 93 additions and 12 deletions

View File

@ -104,5 +104,19 @@ class ArtemisTcpTransport {
}
return TransportConfiguration(factoryName, options)
}
/** Create as list of [TransportConfiguration]. **/
fun tcpTransportsFromList(
direction: ConnectionDirection,
hostAndPortList: List<NetworkHostAndPort>,
config: SSLConfiguration?,
enableSSL: Boolean = true): List<TransportConfiguration>{
val tcpTransports = ArrayList<TransportConfiguration>(hostAndPortList.size)
hostAndPortList.forEach {
tcpTransports.add(tcpTransport(direction, it, config, enableSSL))
}
return tcpTransports
}
}
}