Package com.github.ambry.account.mysql
Class MySqlUtils
- java.lang.Object
-
- com.github.ambry.account.mysql.MySqlUtils
-
public class MySqlUtils extends java.lang.Object
Contains utils methods for MySqlAccountService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MySqlUtils.DbEndpoint
Stores information of a mysql db endpoint
-
Constructor Summary
Constructors Constructor Description MySqlUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.util.List<MySqlUtils.DbEndpoint>>
getDbEndpointsPerDC(java.lang.String dbInfoJsonString)
Parses DB information JSON string and returns a map of datacenter name to list ofMySqlUtils.DbEndpoint
s.
-
-
-
Method Detail
-
getDbEndpointsPerDC
public static java.util.Map<java.lang.String,java.util.List<MySqlUtils.DbEndpoint>> getDbEndpointsPerDC(java.lang.String dbInfoJsonString) throws org.json.JSONException
Parses DB information JSON string and returns a map of datacenter name to list ofMySqlUtils.DbEndpoint
s.- Parameters:
dbInfoJsonString
- the string containing the MySql DB info.- Returns:
- a map of dcName -> list of
MySqlUtils.DbEndpoint
s. - Throws:
org.json.JSONException
- if there is an error parsing the JSON.
-
-