public class ConnectionUtils
extends java.lang.Object
HostInfo
objects.Constructor and Description |
---|
ConnectionUtils() |
Modifier and Type | Method and Description |
---|---|
static HostInfo |
copyWithAdditionalProps(HostInfo baseHostInfo,
ConnectionUrl connectionUrl)
Create a copy of
HostInfo object where host and port are the same while all others are from ConnectionUrl object. |
static HostInfo |
copyWithAdditionalProps(HostInfo baseHostInfo,
HostInfo newHostInfo) |
static HostInfo |
copyWithAdditionalProps(HostInfo baseHostInfo,
java.util.Map<java.lang.String,java.lang.String> additionalProps)
Create a copy of the given
HostInfo object where all details are the same except for the host properties,
which will contain both the original properties and the properties passed into the function. |
public static HostInfo copyWithAdditionalProps(HostInfo baseHostInfo, java.util.Map<java.lang.String,java.lang.String> additionalProps)
HostInfo
object where all details are the same except for the host properties,
which will contain both the original properties and the properties passed into the function.baseHostInfo
- The HostInfo
object to copyadditionalProps
- The map of properties to add to the new HostInfo
copyHostInfo
object where all details are the same except for the host properties,
will contain both the original properties and the properties passed into the function. Returns null if
baseHostInfo is nullpublic static HostInfo copyWithAdditionalProps(HostInfo baseHostInfo, ConnectionUrl connectionUrl)
HostInfo
object where host and port are the same while all others are from ConnectionUrl
object.baseHostInfo
- The HostInfo
object to copy host and port fromconnectionUrl
- All other properties to add to the new HostInfo
HostInfo
object where host and port are the same while all others are from ConnectionUrl
object
Returns baseHostInfo if connectionUrl is null
Returns connectionUrl's HostInfo if baseHostInfo is null