Package com.mysql.cj.jdbc.ha.ca
Class ClusterAwareUtils
java.lang.Object
com.mysql.cj.jdbc.ha.ca.ClusterAwareUtils
public class ClusterAwareUtils
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description ClusterAwareUtils() -
Method Summary
Modifier and Type Method Description static HostInfocopyWithAdditionalProps(HostInfo baseHostInfo, java.util.Map<java.lang.String,java.lang.String> additionalProps)Create a copy of the givenHostInfoobject 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
-
Constructor Details
-
ClusterAwareUtils
public ClusterAwareUtils()
-
-
Method Details
-
copyWithAdditionalProps
public static HostInfo copyWithAdditionalProps(HostInfo baseHostInfo, java.util.Map<java.lang.String,java.lang.String> additionalProps)Create a copy of the givenHostInfoobject 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- Parameters:
baseHostInfo- TheHostInfoobject to copyadditionalProps- The map of properties to add to the newHostInfocopy- Returns:
- A copy of the given
HostInfoobject 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 null
-