public class ClusterAwareUtils
extends java.lang.Object
| Constructor and Description |
|---|
ClusterAwareUtils() |
| 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,
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 functionbaseHostInfo - 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 objectbaseHostInfo - The HostInfo object to copy host and port fromconnectionUrl - All other properties to add to the new HostInfoHostInfo 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