Package com.zendesk.maxwell
Class MaxwellMysqlConfig
- java.lang.Object
-
- com.zendesk.maxwell.MaxwellMysqlConfig
-
public class MaxwellMysqlConfig extends Object
Configuration object describing a mysql connection
-
-
Field Summary
Fields Modifier and Type Field Description Integer
connectTimeoutMS
Connection timeout for JDBC connectionsString
database
boolean
enableHeartbeat
determines whether we enable replication heartbeats.String
host
Map<String,String>
jdbcOptions
Hashmap of key/value JDBC driver options.String
password
Integer
port
com.github.shyiko.mysql.binlog.network.SSLMode
sslMode
String
user
-
Constructor Summary
Constructors Constructor Description MaxwellMysqlConfig()
Instantiate a default connection configMaxwellMysqlConfig(MaxwellMysqlConfig c)
Clone a mysql configMaxwellMysqlConfig(String host, Integer port, String database, String user, String password, com.github.shyiko.mysql.binlog.network.SSLMode sslMode, boolean enableHeartbeat)
Instantiate a mysql connection config
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getConnectionURI()
Build a connection URI from the configString
getConnectionURI(boolean includeDatabase)
Build a connection URI from the configint
hashCode()
boolean
sameServerAs(MaxwellMysqlConfig other)
void
setJDBCOptions(String opts)
Parse JDBC options from a key=val&key2=val2 string
-
-
-
Field Detail
-
host
public String host
-
port
public Integer port
-
database
public String database
-
user
public String user
-
password
public String password
-
sslMode
public com.github.shyiko.mysql.binlog.network.SSLMode sslMode
-
enableHeartbeat
public boolean enableHeartbeat
determines whether we enable replication heartbeats. Different from maxwell heartbeats
-
jdbcOptions
public Map<String,String> jdbcOptions
Hashmap of key/value JDBC driver options. Not used for replication connections, generally.
-
connectTimeoutMS
public Integer connectTimeoutMS
Connection timeout for JDBC connections
-
-
Constructor Detail
-
MaxwellMysqlConfig
public MaxwellMysqlConfig()
Instantiate a default connection config
-
MaxwellMysqlConfig
public MaxwellMysqlConfig(String host, Integer port, String database, String user, String password, com.github.shyiko.mysql.binlog.network.SSLMode sslMode, boolean enableHeartbeat)
Instantiate a mysql connection config- Parameters:
host
- Mysql Hostport
- Mysql portdatabase
- Database nameuser
- Userpassword
- PasswordsslMode
- SSL connection modeenableHeartbeat
- Replication heartbeats
-
MaxwellMysqlConfig
public MaxwellMysqlConfig(MaxwellMysqlConfig c)
Clone a mysql config- Parameters:
c
- the config to clone
-
-
Method Detail
-
setJDBCOptions
public void setJDBCOptions(String opts)
Parse JDBC options from a key=val&key2=val2 string- Parameters:
opts
- string to parse
-
getConnectionURI
public String getConnectionURI(boolean includeDatabase) throws URISyntaxException
Build a connection URI from the config- Parameters:
includeDatabase
- whether to include the database name in th euri- Returns:
- a connection URI string
- Throws:
URISyntaxException
- if we have problems building the URI
-
getConnectionURI
public String getConnectionURI() throws URISyntaxException
Build a connection URI from the config- Returns:
- a connection URI
- Throws:
URISyntaxException
- if we have problems
-
sameServerAs
public boolean sameServerAs(MaxwellMysqlConfig other)
-
-