public class ReplicationMySQLConnection extends MultiHostMySQLConnection implements ReplicationConnection
thisAsProxy
Constructor and Description |
---|
ReplicationMySQLConnection(MultiHostConnectionProxy proxy) |
Modifier and Type | Method and Description |
---|---|
void |
abort(java.util.concurrent.Executor executor) |
void |
abortInternal() |
void |
addSlaveHost(java.lang.String host) |
void |
changeUser(java.lang.String userName,
java.lang.String newPassword)
Changes the user on this connection by performing a re-authentication.
|
boolean |
getAllowMasterDownConnections() |
long |
getConnectionGroupId() |
Connection |
getCurrentConnection() |
Connection |
getMasterConnection() |
java.util.Properties |
getProperties()
Returns the parsed and passed in properties for this connection.
|
boolean |
getReplicationEnableJMX() |
Connection |
getSlavesConnection() |
protected ReplicationConnectionProxy |
getThisAsProxy() |
boolean |
hasSameProperties(Connection c)
Does this connection have the same properties as another?
|
boolean |
isHostMaster(java.lang.String host) |
boolean |
isHostSlave(java.lang.String host) |
boolean |
isReadOnly() |
void |
ping()
Detect if the connection is still good by sending a ping command
to the server.
|
void |
promoteSlaveToMaster(java.lang.String host) |
void |
removeMasterHost(java.lang.String host) |
void |
removeMasterHost(java.lang.String host,
boolean waitUntilNotInUse) |
void |
removeSlave(java.lang.String host) |
void |
removeSlave(java.lang.String host,
boolean closeGently) |
void |
setAllowMasterDownConnections(boolean connectIfMasterDown) |
void |
setProxy(MySQLConnection proxy) |
void |
setReadOnly(boolean readOnlyFlag) |
void |
setReplicationEnableJMX(boolean replicationEnableJMX) |
void |
setStatementComment(java.lang.String comment)
Sets the comment that will be prepended to all statements
sent to the server.
|
checkClosed, clearHasTriedMaster, clearWarnings, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, close, commit, createNewIO, createStatement, createStatement, createStatement, decachePreparedStatement, dumpTestcaseQuery, duplicate, execSQL, execSQL, exposeAsXml, extractSqlFromPacket, generateConnectionCommentBlock, getActiveMySQLConnection, getActiveStatementCount, getAllowLoadLocalInfile, getAllowMultiQueries, getAllowNanAndInf, getAllowPublicKeyRetrieval, getAllowSlaveDownConnections, getAllowUrlInLocalInfile, getAlwaysSendSetIsolation, getAuthenticationPlugins, getAutoClosePStmtStreams, getAutoCommit, getAutoDeserialize, getAutoGenerateTestcaseScript, getAutoIncrementIncrement, getAutoReconnectForPools, getAutoSlowLog, getBlobsAreStrings, getBlobSendChunkSize, getCacheCallableStatements, getCacheCallableStmts, getCacheDefaultTimezone, getCachedMetaData, getCachePreparedStatements, getCachePrepStmts, getCacheResultSetMetadata, getCacheServerConfiguration, getCalendarInstanceForSessionOrNew, getCallableStatementCacheSize, getCallableStmtCacheSize, getCancelTimer, getCapitalizeTypeNames, getCatalog, getCharacterSetMetadata, getCharacterSetResults, getCharsetConverter, getCharsetNameForIndex, getClientCertificateKeyStorePassword, getClientCertificateKeyStoreType, getClientCertificateKeyStoreUrl, getClientInfoProvider, getClobberStreamingResults, getClobCharacterEncoding, getCompensateOnDuplicateKeyUpdateCounts, getConnectionAttributes, getConnectionCollation, getConnectionLifecycleInterceptors, getConnectionMutex, getConnectTimeout, getContinueBatchOnError, getCreateDatabaseIfNotExist, getDefaultAuthenticationPlugin, getDefaultFetchSize, getDefaultTimeZone, getDetectCustomCollations, getDisabledAuthenticationPlugins, getDisconnectOnExpiredPasswords, getDontCheckOnDuplicateKeyUpdateInSQL, getDontTrackOpenResources, getDumpMetadataOnColumnNotFound, getDumpQueriesOnException, getDynamicCalendars, getElideSetAutoCommits, getEmptyStringsConvertToZero, getEmulateLocators, getEmulateUnsupportedPstmts, getEnabledSSLCipherSuites, getEnableEscapeProcessing, getEnablePacketDebug, getEnableQueryTimeouts, getEncoding, getEncodingForIndex, getErrorMessageEncoding, getExceptionInterceptor, getExceptionInterceptors, getExplainSlowQueries, getFailOverReadOnly, getFunctionsNeverReturnBlobs, getGatherPerfMetrics, getGatherPerformanceMetrics, getGenerateSimpleParameterMetadata, getGetProceduresReturnsFunctions, getHoldability, getHoldResultsOpenOverStatementClose, getHost, getId, getIdleFor, getIgnoreNonTxTables, getIncludeInnodbStatusInDeadlockExceptions, getIncludeThreadDumpInDeadlockExceptions, getIncludeThreadNamesAsStatementComment, getInitialTimeout, getInteractiveClient, getIO, getIsInteractiveClient, getJdbcCompliantTruncation, getJdbcCompliantTruncationForReads, getLargeRowSizeThreshold, getLoadBalanceAutoCommitStatementRegex, getLoadBalanceAutoCommitStatementThreshold, getLoadBalanceBlacklistTimeout, getLoadBalanceConnectionGroup, getLoadBalanceEnableJMX, getLoadBalanceExceptionChecker, getLoadBalancePingTimeout, getLoadBalanceSafeProxy, getLoadBalanceSQLExceptionSubclassFailover, getLoadBalanceSQLStateFailover, getLoadBalanceStrategy, getLoadBalanceValidateConnectionOnSwapServer, getLocalSocketAddress, getLocatorFetchBufferSize, getLog, getLogger, getLoggerClassName, getLogSlowQueries, getLogXaCommands, getMaintainTimeStats, getMaxAllowedPacket, getMaxBytesPerChar, getMaxBytesPerChar, getMaxQuerySizeToLog, getMaxReconnects, getMaxRows, getMetaData, getMetadataCacheSize, getMetadataSafeStatement, getMultiHostSafeProxy, getNetBufferLength, getNetTimeoutForStreamingResults, getNetworkTimeout, getNoAccessToProcedureBodies, getNoDatetimeStringSync, getNoTimezoneConversionForDateType, getNoTimezoneConversionForTimeType, getNullCatalogMeansCurrent, getNullNamePatternMatchesAll, getOverrideSupportsIntegrityEnhancementFacility, getPacketDebugBufferSize, getPadCharsWithSpace, getParanoid, getParseInfoCacheFactory, getPasswordCharacterEncoding, getPedantic, getPinGlobalTxToPhysicalConnection, getPopulateInsertRowWithDefaultValues, getPreparedStatementCacheSize, getPreparedStatementCacheSqlLimit, getPrepStmtCacheSize, getPrepStmtCacheSqlLimit, getProcessEscapeCodesForPrepStmts, getProfilerEventHandler, getProfilerEventHandlerInstance, getProfileSql, getProfileSQL, getPropertiesTransform, getQueriesBeforeRetryMaster, getQueryTimeoutKillsConnection, getReadFromMasterWhenNoSlaves, getReadOnlyPropagatesToServer, getReconnectAtTxEnd, getRelaxAutoCommit, getReportMetricsIntervalMillis, getRequiresEscapingEncoder, getRequireSSL, getResourceId, getResultSetSizeThreshold, getRetainStatementAfterResultSetClose, getRetriesAllDown, getRewriteBatchedStatements, getRollbackOnPooledClose, getRoundRobinLoadBalance, getRunningCTS13, getSchema, getSecondsBeforeRetryMaster, getSelfDestructOnPingMaxOperations, getSelfDestructOnPingSecondsLifetime, getSendFractionalSeconds, getServerCharacterEncoding, getServerCharset, getServerConfigCacheFactory, getServerMajorVersion, getServerMinorVersion, getServerRSAPublicKeyFile, getServerSubMinorVersion, getServerTimezone, getServerTimezoneTZ, getServerVariable, getServerVersion, getSessionLockedCalendar, getSessionMaxRows, getSessionVariables, getSlowQueryThresholdMillis, getSlowQueryThresholdNanos, getSocketFactory, getSocketFactoryClassName, getSocketTimeout, getSocksProxyHost, getSocksProxyPort, getStatementComment, getStatementInterceptors, getStatementInterceptorsInstances, getStrictFloatingPoint, getStrictUpdates, getTcpKeepAlive, getTcpNoDelay, getTcpRcvBuf, getTcpSndBuf, getTcpTrafficClass, getTinyInt1isBit, getTraceProtocol, getTransactionIsolation, getTransformedBitIsBoolean, getTreatUtilDateAsTimestamp, getTrustCertificateKeyStorePassword, getTrustCertificateKeyStoreType, getTrustCertificateKeyStoreUrl, getTypeMap, getUltraDevHack, getURL, getUseAffectedRows, getUseBlobToStoreUTF8OutsideBMP, getUseColumnNamesInFindColumn, getUseCompression, getUseConfigs, getUseCursorFetch, getUseDirectRowUnpack, getUseDynamicCharsetInfo, getUseFastDateParsing, getUseFastIntParsing, getUseGmtMillisForDatetimes, getUseHostsInPrivileges, getUseInformationSchema, getUseJDBCCompliantTimezoneShift, getUseJvmCharsetConverters, getUseLegacyDatetimeCode, getUseLocalSessionState, getUseLocalTransactionState, getUseNanosForElapsedTime, getUseOldAliasMetadataBehavior, getUseOldUTF8Behavior, getUseOnlyServerErrorMessages, getUser, getUseReadAheadInput, getUseServerPreparedStmts, getUseServerPrepStmts, getUseSqlStateCodes, getUseSSL, getUseSSPSCompatibleTimezoneShift, getUseStreamLengthsInPrepStmts, getUseTimezone, getUseUltraDevWorkAround, getUseUnbufferedInput, getUseUnicode, getUseUsageAdvisor, getUtcCalendar, getUtf8OutsideBmpExcludedColumnNamePattern, getUtf8OutsideBmpIncludedColumnNamePattern, getVerifyServerCertificate, getWarnings, getYearIsDateType, getZeroDateTimeBehavior, hasTriedMaster, incrementNumberOfPreparedExecutes, incrementNumberOfPrepares, incrementNumberOfResultSetsCreated, initializeExtension, initializeResultsMetadataFromCache, initializeSafeStatementInterceptors, isAbonormallyLongQuery, isClientTzUTC, isClosed, isCursorFetchEnabled, isInGlobalTx, isMasterConnection, isNoBackslashEscapesSet, isProxySet, isReadInfoMsgEnabled, isReadOnly, isRunningOnJDK13, isSameResource, isServerLocal, isServerTzUTC, isUseSSLExplicit, lowerCaseTableNames, nativeSQL, parserKnowsUnicode, pingInternal, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, realClose, recachePreparedStatement, registerQueryExecutionTime, registerStatement, releaseSavepoint, reportNumberOfTablesAccessed, reportQueryTime, resetServerState, rollback, rollback, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, serverSupportsConvertFn, setAllowLoadLocalInfile, setAllowMultiQueries, setAllowNanAndInf, setAllowPublicKeyRetrieval, setAllowSlaveDownConnections, setAllowUrlInLocalInfile, setAlwaysSendSetIsolation, setAuthenticationPlugins, setAutoClosePStmtStreams, setAutoCommit, setAutoDeserialize, setAutoGenerateTestcaseScript, setAutoReconnect, setAutoReconnectForConnectionPools, setAutoReconnectForPools, setAutoSlowLog, setBlobsAreStrings, setBlobSendChunkSize, setCacheCallableStatements, setCacheCallableStmts, setCacheDefaultTimezone, setCachePreparedStatements, setCachePrepStmts, setCacheResultSetMetadata, setCacheServerConfiguration, setCallableStatementCacheSize, setCallableStmtCacheSize, setCapitalizeDBMDTypes, setCapitalizeTypeNames, setCatalog, setCharacterEncoding, setCharacterSetResults, setClientCertificateKeyStorePassword, setClientCertificateKeyStoreType, setClientCertificateKeyStoreUrl, setClientInfoProvider, setClobberStreamingResults, setClobCharacterEncoding, setCompensateOnDuplicateKeyUpdateCounts, setConnectionCollation, setConnectionLifecycleInterceptors, setConnectTimeout, setContinueBatchOnError, setCreateDatabaseIfNotExist, setDefaultAuthenticationPlugin, setDefaultFetchSize, setDetectCustomCollations, setDetectServerPreparedStmts, setDisabledAuthenticationPlugins, setDisconnectOnExpiredPasswords, setDontCheckOnDuplicateKeyUpdateInSQL, setDontTrackOpenResources, setDumpMetadataOnColumnNotFound, setDumpQueriesOnException, setDynamicCalendars, setElideSetAutoCommits, setEmptyStringsConvertToZero, setEmulateLocators, setEmulateUnsupportedPstmts, setEnabledSSLCipherSuites, setEnableEscapeProcessing, setEnablePacketDebug, setEnableQueryTimeouts, setEncoding, setExceptionInterceptors, setExplainSlowQueries, setFailedOver, setFailOverReadOnly, setFunctionsNeverReturnBlobs, setGatherPerfMetrics, setGatherPerformanceMetrics, setGenerateSimpleParameterMetadata, setGetProceduresReturnsFunctions, setHoldability, setHoldResultsOpenOverStatementClose, setIgnoreNonTxTables, setIncludeInnodbStatusInDeadlockExceptions, setIncludeThreadDumpInDeadlockExceptions, setIncludeThreadNamesAsStatementComment, setInGlobalTx, setInitialTimeout, setInteractiveClient, setIsInteractiveClient, setJdbcCompliantTruncation, setJdbcCompliantTruncationForReads, setLargeRowSizeThreshold, setLoadBalanceAutoCommitStatementRegex, setLoadBalanceAutoCommitStatementThreshold, setLoadBalanceBlacklistTimeout, setLoadBalanceConnectionGroup, setLoadBalanceEnableJMX, setLoadBalanceExceptionChecker, setLoadBalancePingTimeout, setLoadBalanceSQLExceptionSubclassFailover, setLoadBalanceSQLStateFailover, setLoadBalanceStrategy, setLoadBalanceValidateConnectionOnSwapServer, setLocalSocketAddress, setLocatorFetchBufferSize, setLogger, setLoggerClassName, setLogSlowQueries, setLogXaCommands, setMaintainTimeStats, setMaxQuerySizeToLog, setMaxReconnects, setMaxRows, setMetadataCacheSize, setNetTimeoutForStreamingResults, setNetworkTimeout, setNoAccessToProcedureBodies, setNoDatetimeStringSync, setNoTimezoneConversionForDateType, setNoTimezoneConversionForTimeType, setNullCatalogMeansCurrent, setNullNamePatternMatchesAll, setOverrideSupportsIntegrityEnhancementFacility, setPacketDebugBufferSize, setPadCharsWithSpace, setParanoid, setParseInfoCacheFactory, setPasswordCharacterEncoding, setPedantic, setPinGlobalTxToPhysicalConnection, setPopulateInsertRowWithDefaultValues, setPreferSlaveDuringFailover, setPreparedStatementCacheSize, setPreparedStatementCacheSqlLimit, setPrepStmtCacheSize, setPrepStmtCacheSqlLimit, setProcessEscapeCodesForPrepStmts, setProfilerEventHandler, setProfilerEventHandlerInstance, setProfileSql, setProfileSQL, setPropertiesTransform, setQueriesBeforeRetryMaster, setQueryTimeoutKillsConnection, setReadFromMasterWhenNoSlaves, setReadInfoMsgEnabled, setReadOnlyInternal, setReadOnlyPropagatesToServer, setReconnectAtTxEnd, setRelaxAutoCommit, setReportMetricsIntervalMillis, setRequireSSL, setResourceId, setResultSetSizeThreshold, setRetainStatementAfterResultSetClose, setRetriesAllDown, setRewriteBatchedStatements, setRollbackOnPooledClose, setRoundRobinLoadBalance, setRunningCTS13, setSavepoint, setSavepoint, setSchema, setSecondsBeforeRetryMaster, setSelfDestructOnPingMaxOperations, setSelfDestructOnPingSecondsLifetime, setSendFractionalSeconds, setServerConfigCacheFactory, setServerRSAPublicKeyFile, setServerTimezone, setSessionMaxRows, setSessionVariables, setSlowQueryThresholdMillis, setSlowQueryThresholdNanos, setSocketFactory, setSocketFactoryClassName, setSocketTimeout, setSocksProxyHost, setSocksProxyPort, setStatementInterceptors, setStrictFloatingPoint, setStrictUpdates, setTcpKeepAlive, setTcpNoDelay, setTcpRcvBuf, setTcpSndBuf, setTcpTrafficClass, setTinyInt1isBit, setTraceProtocol, setTransactionIsolation, setTransformedBitIsBoolean, setTreatUtilDateAsTimestamp, setTrustCertificateKeyStorePassword, setTrustCertificateKeyStoreType, setTrustCertificateKeyStoreUrl, setTypeMap, setUltraDevHack, setUseAffectedRows, setUseBlobToStoreUTF8OutsideBMP, setUseColumnNamesInFindColumn, setUseCompression, setUseConfigs, setUseCursorFetch, setUseDirectRowUnpack, setUseDynamicCharsetInfo, setUseFastDateParsing, setUseFastIntParsing, setUseGmtMillisForDatetimes, setUseHostsInPrivileges, setUseInformationSchema, setUseJDBCCompliantTimezoneShift, setUseJvmCharsetConverters, setUseLegacyDatetimeCode, setUseLocalSessionState, setUseLocalTransactionState, setUseNanosForElapsedTime, setUseOldAliasMetadataBehavior, setUseOldUTF8Behavior, setUseOnlyServerErrorMessages, setUseReadAheadInput, setUseServerPreparedStmts, setUseServerPrepStmts, setUseSqlStateCodes, setUseSSL, setUseSSPSCompatibleTimezoneShift, setUseStreamLengthsInPrepStmts, setUseTimezone, setUseUltraDevWorkAround, setUseUnbufferedInput, setUseUnicode, setUseUsageAdvisor, setUtf8OutsideBmpExcludedColumnNamePattern, setUtf8OutsideBmpIncludedColumnNamePattern, setVerifyServerCertificate, setYearIsDateType, setZeroDateTimeBehavior, shutdownServer, storesLowerCaseTableName, supportsIsolationLevel, supportsQuotedIdentifiers, supportsTransactions, throwConnectionClosedException, transactionBegun, transactionCompleted, unregisterStatement, unSafeStatementInterceptors, useAnsiQuotedIdentifiers, useUnbufferedInput, versionMeetsMinimum
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createNewIO, decachePreparedStatement, dumpTestcaseQuery, duplicate, execSQL, execSQL, extractSqlFromPacket, generateConnectionCommentBlock, getActiveStatementCount, getAutoIncrementIncrement, getCachedMetaData, getCalendarInstanceForSessionOrNew, getCancelTimer, getCharacterSetMetadata, getCharsetConverter, getCharsetNameForIndex, getConnectionAttributes, getDefaultTimeZone, getEncodingForIndex, getErrorMessageEncoding, getExceptionInterceptor, getHost, getId, getIdleFor, getIO, getLoadBalanceSafeProxy, getLog, getMaxBytesPerChar, getMaxBytesPerChar, getMetadataSafeStatement, getMultiHostSafeProxy, getNetBufferLength, getProfilerEventHandlerInstance, getRequiresEscapingEncoder, getServerCharset, getServerMajorVersion, getServerMinorVersion, getServerSubMinorVersion, getServerTimezoneTZ, getServerVariable, getServerVersion, getSessionLockedCalendar, getStatementComment, getStatementInterceptorsInstances, getURL, getUser, getUtcCalendar, incrementNumberOfPreparedExecutes, incrementNumberOfPrepares, incrementNumberOfResultSetsCreated, initializeResultsMetadataFromCache, initializeSafeStatementInterceptors, isAbonormallyLongQuery, isClientTzUTC, isCursorFetchEnabled, isProxySet, isReadInfoMsgEnabled, isReadOnly, isRunningOnJDK13, isServerTzUTC, lowerCaseTableNames, pingInternal, realClose, recachePreparedStatement, registerQueryExecutionTime, registerStatement, reportNumberOfTablesAccessed, serverSupportsConvertFn, setProfilerEventHandlerInstance, setReadInfoMsgEnabled, setReadOnlyInternal, shutdownServer, storesLowerCaseTableName, throwConnectionClosedException, transactionBegun, transactionCompleted, unregisterStatement, unSafeStatementInterceptors, useAnsiQuotedIdentifiers
checkClosed, clearHasTriedMaster, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, getConnectionMutex, getNetworkTimeout, getSchema, getServerCharacterEncoding, getSessionMaxRows, hasTriedMaster, initializeExtension, isInGlobalTx, isMasterConnection, isNoBackslashEscapesSet, isSameResource, isServerLocal, parserKnowsUnicode, reportQueryTime, resetServerState, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, serverPrepareStatement, setFailedOver, setInGlobalTx, setNetworkTimeout, setPreferSlaveDuringFailover, setSchema, setSessionMaxRows, supportsIsolationLevel, supportsQuotedIdentifiers, supportsTransactions, versionMeetsMinimum
clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap
exposeAsXml, getAllowLoadLocalInfile, getAllowMultiQueries, getAllowNanAndInf, getAllowPublicKeyRetrieval, getAllowSlaveDownConnections, getAllowUrlInLocalInfile, getAlwaysSendSetIsolation, getAuthenticationPlugins, getAutoClosePStmtStreams, getAutoDeserialize, getAutoGenerateTestcaseScript, getAutoReconnectForPools, getAutoSlowLog, getBlobsAreStrings, getBlobSendChunkSize, getCacheCallableStatements, getCacheCallableStmts, getCacheDefaultTimezone, getCachePreparedStatements, getCachePrepStmts, getCacheResultSetMetadata, getCacheServerConfiguration, getCallableStatementCacheSize, getCallableStmtCacheSize, getCapitalizeTypeNames, getCharacterSetResults, getClientCertificateKeyStorePassword, getClientCertificateKeyStoreType, getClientCertificateKeyStoreUrl, getClientInfoProvider, getClobberStreamingResults, getClobCharacterEncoding, getCompensateOnDuplicateKeyUpdateCounts, getConnectionCollation, getConnectionLifecycleInterceptors, getConnectTimeout, getContinueBatchOnError, getCreateDatabaseIfNotExist, getDefaultAuthenticationPlugin, getDefaultFetchSize, getDetectCustomCollations, getDisabledAuthenticationPlugins, getDisconnectOnExpiredPasswords, getDontCheckOnDuplicateKeyUpdateInSQL, getDontTrackOpenResources, getDumpMetadataOnColumnNotFound, getDumpQueriesOnException, getDynamicCalendars, getElideSetAutoCommits, getEmptyStringsConvertToZero, getEmulateLocators, getEmulateUnsupportedPstmts, getEnabledSSLCipherSuites, getEnableEscapeProcessing, getEnablePacketDebug, getEnableQueryTimeouts, getEncoding, getExceptionInterceptors, getExplainSlowQueries, getFailOverReadOnly, getFunctionsNeverReturnBlobs, getGatherPerfMetrics, getGatherPerformanceMetrics, getGenerateSimpleParameterMetadata, getGetProceduresReturnsFunctions, getHoldResultsOpenOverStatementClose, getIgnoreNonTxTables, getIncludeInnodbStatusInDeadlockExceptions, getIncludeThreadDumpInDeadlockExceptions, getIncludeThreadNamesAsStatementComment, getInitialTimeout, getInteractiveClient, getIsInteractiveClient, getJdbcCompliantTruncation, getJdbcCompliantTruncationForReads, getLargeRowSizeThreshold, getLoadBalanceAutoCommitStatementRegex, getLoadBalanceAutoCommitStatementThreshold, getLoadBalanceBlacklistTimeout, getLoadBalanceConnectionGroup, getLoadBalanceEnableJMX, getLoadBalanceExceptionChecker, getLoadBalancePingTimeout, getLoadBalanceSQLExceptionSubclassFailover, getLoadBalanceSQLStateFailover, getLoadBalanceStrategy, getLoadBalanceValidateConnectionOnSwapServer, getLocalSocketAddress, getLocatorFetchBufferSize, getLogger, getLoggerClassName, getLogSlowQueries, getLogXaCommands, getMaintainTimeStats, getMaxAllowedPacket, getMaxQuerySizeToLog, getMaxReconnects, getMaxRows, getMetadataCacheSize, getNetTimeoutForStreamingResults, getNoAccessToProcedureBodies, getNoDatetimeStringSync, getNoTimezoneConversionForDateType, getNoTimezoneConversionForTimeType, getNullCatalogMeansCurrent, getNullNamePatternMatchesAll, getOverrideSupportsIntegrityEnhancementFacility, getPacketDebugBufferSize, getPadCharsWithSpace, getParanoid, getParseInfoCacheFactory, getPasswordCharacterEncoding, getPedantic, getPinGlobalTxToPhysicalConnection, getPopulateInsertRowWithDefaultValues, getPreparedStatementCacheSize, getPreparedStatementCacheSqlLimit, getPrepStmtCacheSize, getPrepStmtCacheSqlLimit, getProcessEscapeCodesForPrepStmts, getProfilerEventHandler, getProfileSql, getProfileSQL, getPropertiesTransform, getQueriesBeforeRetryMaster, getQueryTimeoutKillsConnection, getReadFromMasterWhenNoSlaves, getReadOnlyPropagatesToServer, getReconnectAtTxEnd, getRelaxAutoCommit, getReportMetricsIntervalMillis, getRequireSSL, getResourceId, getResultSetSizeThreshold, getRetainStatementAfterResultSetClose, getRetriesAllDown, getRewriteBatchedStatements, getRollbackOnPooledClose, getRoundRobinLoadBalance, getRunningCTS13, getSecondsBeforeRetryMaster, getSelfDestructOnPingMaxOperations, getSelfDestructOnPingSecondsLifetime, getSendFractionalSeconds, getServerConfigCacheFactory, getServerRSAPublicKeyFile, getServerTimezone, getSessionVariables, getSlowQueryThresholdMillis, getSlowQueryThresholdNanos, getSocketFactory, getSocketFactoryClassName, getSocketTimeout, getSocksProxyHost, getSocksProxyPort, getStatementInterceptors, getStrictFloatingPoint, getStrictUpdates, getTcpKeepAlive, getTcpNoDelay, getTcpRcvBuf, getTcpSndBuf, getTcpTrafficClass, getTinyInt1isBit, getTraceProtocol, getTransformedBitIsBoolean, getTreatUtilDateAsTimestamp, getTrustCertificateKeyStorePassword, getTrustCertificateKeyStoreType, getTrustCertificateKeyStoreUrl, getUltraDevHack, getUseAffectedRows, getUseBlobToStoreUTF8OutsideBMP, getUseColumnNamesInFindColumn, getUseCompression, getUseConfigs, getUseCursorFetch, getUseDirectRowUnpack, getUseDynamicCharsetInfo, getUseFastDateParsing, getUseFastIntParsing, getUseGmtMillisForDatetimes, getUseHostsInPrivileges, getUseInformationSchema, getUseJDBCCompliantTimezoneShift, getUseJvmCharsetConverters, getUseLegacyDatetimeCode, getUseLocalSessionState, getUseLocalTransactionState, getUseNanosForElapsedTime, getUseOldAliasMetadataBehavior, getUseOldUTF8Behavior, getUseOnlyServerErrorMessages, getUseReadAheadInput, getUseServerPreparedStmts, getUseServerPrepStmts, getUseSqlStateCodes, getUseSSL, getUseSSPSCompatibleTimezoneShift, getUseStreamLengthsInPrepStmts, getUseTimezone, getUseUltraDevWorkAround, getUseUnbufferedInput, getUseUnicode, getUseUsageAdvisor, getUtf8OutsideBmpExcludedColumnNamePattern, getUtf8OutsideBmpIncludedColumnNamePattern, getVerifyServerCertificate, getYearIsDateType, getZeroDateTimeBehavior, isUseSSLExplicit, setAllowLoadLocalInfile, setAllowMultiQueries, setAllowNanAndInf, setAllowPublicKeyRetrieval, setAllowSlaveDownConnections, setAllowUrlInLocalInfile, setAlwaysSendSetIsolation, setAuthenticationPlugins, setAutoClosePStmtStreams, setAutoDeserialize, setAutoGenerateTestcaseScript, setAutoReconnect, setAutoReconnectForConnectionPools, setAutoReconnectForPools, setAutoSlowLog, setBlobsAreStrings, setBlobSendChunkSize, setCacheCallableStatements, setCacheCallableStmts, setCacheDefaultTimezone, setCachePreparedStatements, setCachePrepStmts, setCacheResultSetMetadata, setCacheServerConfiguration, setCallableStatementCacheSize, setCallableStmtCacheSize, setCapitalizeDBMDTypes, setCapitalizeTypeNames, setCharacterEncoding, setCharacterSetResults, setClientCertificateKeyStorePassword, setClientCertificateKeyStoreType, setClientCertificateKeyStoreUrl, setClientInfoProvider, setClobberStreamingResults, setClobCharacterEncoding, setCompensateOnDuplicateKeyUpdateCounts, setConnectionCollation, setConnectionLifecycleInterceptors, setConnectTimeout, setContinueBatchOnError, setCreateDatabaseIfNotExist, setDefaultAuthenticationPlugin, setDefaultFetchSize, setDetectCustomCollations, setDetectServerPreparedStmts, setDisabledAuthenticationPlugins, setDisconnectOnExpiredPasswords, setDontCheckOnDuplicateKeyUpdateInSQL, setDontTrackOpenResources, setDumpMetadataOnColumnNotFound, setDumpQueriesOnException, setDynamicCalendars, setElideSetAutoCommits, setEmptyStringsConvertToZero, setEmulateLocators, setEmulateUnsupportedPstmts, setEnabledSSLCipherSuites, setEnableEscapeProcessing, setEnablePacketDebug, setEnableQueryTimeouts, setEncoding, setExceptionInterceptors, setExplainSlowQueries, setFailOverReadOnly, setFunctionsNeverReturnBlobs, setGatherPerfMetrics, setGatherPerformanceMetrics, setGenerateSimpleParameterMetadata, setGetProceduresReturnsFunctions, setHoldResultsOpenOverStatementClose, setIgnoreNonTxTables, setIncludeInnodbStatusInDeadlockExceptions, setIncludeThreadDumpInDeadlockExceptions, setIncludeThreadNamesAsStatementComment, setInitialTimeout, setInteractiveClient, setIsInteractiveClient, setJdbcCompliantTruncation, setJdbcCompliantTruncationForReads, setLargeRowSizeThreshold, setLoadBalanceAutoCommitStatementRegex, setLoadBalanceAutoCommitStatementThreshold, setLoadBalanceBlacklistTimeout, setLoadBalanceConnectionGroup, setLoadBalanceEnableJMX, setLoadBalanceExceptionChecker, setLoadBalancePingTimeout, setLoadBalanceSQLExceptionSubclassFailover, setLoadBalanceSQLStateFailover, setLoadBalanceStrategy, setLoadBalanceValidateConnectionOnSwapServer, setLocalSocketAddress, setLocatorFetchBufferSize, setLogger, setLoggerClassName, setLogSlowQueries, setLogXaCommands, setMaintainTimeStats, setMaxQuerySizeToLog, setMaxReconnects, setMaxRows, setMetadataCacheSize, setNetTimeoutForStreamingResults, setNoAccessToProcedureBodies, setNoDatetimeStringSync, setNoTimezoneConversionForDateType, setNoTimezoneConversionForTimeType, setNullCatalogMeansCurrent, setNullNamePatternMatchesAll, setOverrideSupportsIntegrityEnhancementFacility, setPacketDebugBufferSize, setPadCharsWithSpace, setParanoid, setParseInfoCacheFactory, setPasswordCharacterEncoding, setPedantic, setPinGlobalTxToPhysicalConnection, setPopulateInsertRowWithDefaultValues, setPreparedStatementCacheSize, setPreparedStatementCacheSqlLimit, setPrepStmtCacheSize, setPrepStmtCacheSqlLimit, setProcessEscapeCodesForPrepStmts, setProfilerEventHandler, setProfileSql, setProfileSQL, setPropertiesTransform, setQueriesBeforeRetryMaster, setQueryTimeoutKillsConnection, setReadFromMasterWhenNoSlaves, setReadOnlyPropagatesToServer, setReconnectAtTxEnd, setRelaxAutoCommit, setReportMetricsIntervalMillis, setRequireSSL, setResourceId, setResultSetSizeThreshold, setRetainStatementAfterResultSetClose, setRetriesAllDown, setRewriteBatchedStatements, setRollbackOnPooledClose, setRoundRobinLoadBalance, setRunningCTS13, setSecondsBeforeRetryMaster, setSelfDestructOnPingMaxOperations, setSelfDestructOnPingSecondsLifetime, setSendFractionalSeconds, setServerConfigCacheFactory, setServerRSAPublicKeyFile, setServerTimezone, setSessionVariables, setSlowQueryThresholdMillis, setSlowQueryThresholdNanos, setSocketFactory, setSocketFactoryClassName, setSocketTimeout, setSocksProxyHost, setSocksProxyPort, setStatementInterceptors, setStrictFloatingPoint, setStrictUpdates, setTcpKeepAlive, setTcpNoDelay, setTcpRcvBuf, setTcpSndBuf, setTcpTrafficClass, setTinyInt1isBit, setTraceProtocol, setTransformedBitIsBoolean, setTreatUtilDateAsTimestamp, setTrustCertificateKeyStorePassword, setTrustCertificateKeyStoreType, setTrustCertificateKeyStoreUrl, setUltraDevHack, setUseAffectedRows, setUseBlobToStoreUTF8OutsideBMP, setUseColumnNamesInFindColumn, setUseCompression, setUseConfigs, setUseCursorFetch, setUseDirectRowUnpack, setUseDynamicCharsetInfo, setUseFastDateParsing, setUseFastIntParsing, setUseGmtMillisForDatetimes, setUseHostsInPrivileges, setUseInformationSchema, setUseJDBCCompliantTimezoneShift, setUseJvmCharsetConverters, setUseLegacyDatetimeCode, setUseLocalSessionState, setUseLocalTransactionState, setUseNanosForElapsedTime, setUseOldAliasMetadataBehavior, setUseOldUTF8Behavior, setUseOnlyServerErrorMessages, setUseReadAheadInput, setUseServerPreparedStmts, setUseServerPrepStmts, setUseSqlStateCodes, setUseSSL, setUseSSPSCompatibleTimezoneShift, setUseStreamLengthsInPrepStmts, setUseTimezone, setUseUltraDevWorkAround, setUseUnbufferedInput, setUseUnicode, setUseUsageAdvisor, setUtf8OutsideBmpExcludedColumnNamePattern, setUtf8OutsideBmpIncludedColumnNamePattern, setVerifyServerCertificate, setYearIsDateType, setZeroDateTimeBehavior, useUnbufferedInput
public ReplicationMySQLConnection(MultiHostConnectionProxy proxy)
protected ReplicationConnectionProxy getThisAsProxy()
getThisAsProxy
in class MultiHostMySQLConnection
public Connection getCurrentConnection()
getCurrentConnection
in interface ReplicationConnection
public long getConnectionGroupId()
getConnectionGroupId
in interface ReplicationConnection
public Connection getMasterConnection()
getMasterConnection
in interface ReplicationConnection
public void promoteSlaveToMaster(java.lang.String host) throws java.sql.SQLException
promoteSlaveToMaster
in interface ReplicationConnection
java.sql.SQLException
public void removeMasterHost(java.lang.String host) throws java.sql.SQLException
removeMasterHost
in interface ReplicationConnection
java.sql.SQLException
public void removeMasterHost(java.lang.String host, boolean waitUntilNotInUse) throws java.sql.SQLException
removeMasterHost
in interface ReplicationConnection
java.sql.SQLException
public boolean isHostMaster(java.lang.String host)
isHostMaster
in interface ReplicationConnection
public Connection getSlavesConnection()
getSlavesConnection
in interface ReplicationConnection
public void addSlaveHost(java.lang.String host) throws java.sql.SQLException
addSlaveHost
in interface ReplicationConnection
java.sql.SQLException
public void removeSlave(java.lang.String host) throws java.sql.SQLException
removeSlave
in interface ReplicationConnection
java.sql.SQLException
public void removeSlave(java.lang.String host, boolean closeGently) throws java.sql.SQLException
removeSlave
in interface ReplicationConnection
java.sql.SQLException
public boolean isHostSlave(java.lang.String host)
isHostSlave
in interface ReplicationConnection
public void setReadOnly(boolean readOnlyFlag) throws java.sql.SQLException
setReadOnly
in interface java.sql.Connection
setReadOnly
in class MultiHostMySQLConnection
java.sql.SQLException
public boolean isReadOnly() throws java.sql.SQLException
isReadOnly
in interface MySQLConnection
isReadOnly
in interface java.sql.Connection
isReadOnly
in class MultiHostMySQLConnection
java.sql.SQLException
public void ping() throws java.sql.SQLException
Connection
ping
in class MultiHostMySQLConnection
java.sql.SQLException
- if the ping failspublic void changeUser(java.lang.String userName, java.lang.String newPassword) throws java.sql.SQLException
Connection
changeUser
in class MultiHostMySQLConnection
userName
- the username to authenticate withnewPassword
- the password to authenticate withjava.sql.SQLException
- if authentication fails, or some other error occurs while
performing the command.public void setStatementComment(java.lang.String comment)
Connection
setStatementComment
in class MultiHostMySQLConnection
comment
- the comment that will be prepended to all statements
sent to the server.public boolean hasSameProperties(Connection c)
Connection
hasSameProperties
in class MultiHostMySQLConnection
public java.util.Properties getProperties()
Connection
getProperties
in interface MySQLConnection
getProperties
in class MultiHostMySQLConnection
public void abort(java.util.concurrent.Executor executor) throws java.sql.SQLException
abort
in interface java.sql.Connection
abort
in class MultiHostMySQLConnection
java.sql.SQLException
public void abortInternal() throws java.sql.SQLException
abortInternal
in class MultiHostMySQLConnection
java.sql.SQLException
public boolean getAllowMasterDownConnections()
getAllowMasterDownConnections
in interface ConnectionProperties
getAllowMasterDownConnections
in class MultiHostMySQLConnection
public void setAllowMasterDownConnections(boolean connectIfMasterDown)
setAllowMasterDownConnections
in interface ConnectionProperties
setAllowMasterDownConnections
in class MultiHostMySQLConnection
public boolean getReplicationEnableJMX()
getReplicationEnableJMX
in interface ConnectionProperties
getReplicationEnableJMX
in class MultiHostMySQLConnection
public void setReplicationEnableJMX(boolean replicationEnableJMX)
setReplicationEnableJMX
in interface ConnectionProperties
setReplicationEnableJMX
in class MultiHostMySQLConnection
public void setProxy(MySQLConnection proxy)
setProxy
in interface MySQLConnection
setProxy
in class MultiHostMySQLConnection