Class MaxwellMysqlConfig


  • public class MaxwellMysqlConfig
    extends Object
    Configuration object describing a mysql connection
    • Field Detail

      • database

        public String database
      • 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 Host
        port - Mysql port
        database - Database name
        user - User
        password - Password
        sslMode - SSL connection mode
        enableHeartbeat - 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object