Class ReplicationMySQLConnection
java.lang.Object
com.mysql.jdbc.MultiHostMySQLConnection
com.mysql.jdbc.ReplicationMySQLConnection
- All Implemented Interfaces:
Connection, ConnectionProperties, MySQLConnection, ReplicationConnection, AutoCloseable, Connection, Wrapper
- Direct Known Subclasses:
JDBC4ReplicationMySQLConnection
public class ReplicationMySQLConnection
extends MultiHostMySQLConnection
implements ReplicationConnection
-
Field Summary
Fields inherited from class MultiHostMySQLConnection
thisAsProxyFields inherited from interface Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidaddSlaveHost(String host) voidchangeUser(String userName, String newPassword) Changes the user on this connection by performing a re-authentication.booleanlongReturns the parsed and passed in properties for this connection.booleanprotected ReplicationConnectionProxybooleanDoes this connection have the same properties as another?booleanisHostMaster(String host) booleanisHostSlave(String host) booleanvoidping()Detect if the connection is still good by sending a ping command to the server.voidpromoteSlaveToMaster(String host) voidremoveMasterHost(String host) voidremoveMasterHost(String host, boolean waitUntilNotInUse) voidremoveSlave(String host) voidremoveSlave(String host, boolean closeGently) voidsetAllowMasterDownConnections(boolean connectIfMasterDown) voidsetProxy(MySQLConnection proxy) voidsetReadOnly(boolean readOnlyFlag) voidsetReplicationEnableJMX(boolean replicationEnableJMX) voidsetStatementComment(String comment) Sets the comment that will be prepended to all statements sent to the server.Methods inherited from class MultiHostMySQLConnection
checkClosed, clearHasTriedMaster, clearWarnings, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, clientPrepareStatement, close, commit, createNewIO, createStatement, createStatement, createStatement, decachePreparedStatement, dumpTestcaseQuery, duplicate, execSQL, execSQL, exposeAsXml, extractSqlFromPacket, generateConnectionCommentBlock, 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, getEnabledTLSProtocols, getEnableEscapeProcessing, getEnablePacketDebug, getEnableQueryTimeouts, getEncoding, getEncodingForIndex, getErrorMessageEncoding, getExceptionInterceptor, getExceptionInterceptors, getExplainSlowQueries, getFailOverReadOnly, getFunctionsNeverReturnBlobs, getGatherPerfMetrics, getGatherPerformanceMetrics, getGenerateSimpleParameterMetadata, getGetProceduresReturnsFunctions, getHoldability, getHoldResultsOpenOverStatementClose, getHost, getHostPortPair, getId, getIdleFor, getIgnoreNonTxTables, getIncludeInnodbStatusInDeadlockExceptions, getIncludeThreadDumpInDeadlockExceptions, getIncludeThreadNamesAsStatementComment, getInitialTimeout, getInteractiveClient, getIO, getIsInteractiveClient, getJdbcCompliantTruncation, getJdbcCompliantTruncationForReads, getLargeRowSizeThreshold, getLoadBalanceAutoCommitStatementRegex, getLoadBalanceAutoCommitStatementThreshold, getLoadBalanceBlacklistTimeout, getLoadBalanceConnectionGroup, getLoadBalanceEnableJMX, getLoadBalanceExceptionChecker, getLoadBalanceHostRemovalGracePeriod, 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, getQueryTimingUnits, getReadFromMasterWhenNoSlaves, getReadOnlyPropagatesToServer, getReconnectAtTxEnd, getRelaxAutoCommit, getReportMetricsIntervalMillis, getRequiresEscapingEncoder, getRequireSSL, getResourceId, getResultSetSizeThreshold, getRetainStatementAfterResultSetClose, getRetriesAllDown, getRewriteBatchedStatements, getRollbackOnPooledClose, getRoundRobinLoadBalance, getRunningCTS13, getSchema, getSecondsBeforeRetryMaster, getSelfDestructOnPingMaxOperations, getSelfDestructOnPingSecondsLifetime, getSendFractionalSeconds, getServerAffinityOrder, 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, isServerTruncatesFracSecs, 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, setEnabledTLSProtocols, 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, setLoadBalanceHostRemovalGracePeriod, 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, setServerAffinityOrder, 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, versionMeetsMinimumMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Connection
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, versionMeetsMinimumMethods inherited from interface Connection
beginRequest, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, endRequest, 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, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid, setTransactionIsolation, setTypeMapMethods inherited from interface ConnectionProperties
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, getEnabledTLSProtocols, 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, getLoadBalanceHostRemovalGracePeriod, 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, getServerAffinityOrder, 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, setEnabledTLSProtocols, 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, setLoadBalanceHostRemovalGracePeriod, 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, setServerAffinityOrder, 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, useUnbufferedInputMethods inherited from interface MySQLConnection
createNewIO, decachePreparedStatement, dumpTestcaseQuery, duplicate, execSQL, execSQL, extractSqlFromPacket, generateConnectionCommentBlock, getActiveStatementCount, getAutoIncrementIncrement, getCachedMetaData, getCalendarInstanceForSessionOrNew, getCancelTimer, getCharacterSetMetadata, getCharsetConverter, getCharsetNameForIndex, getConnectionAttributes, getDefaultTimeZone, getEncodingForIndex, getErrorMessageEncoding, getExceptionInterceptor, getHost, getHostPortPair, getId, getIdleFor, getIO, getLoadBalanceSafeProxy, getLog, getMaxBytesPerChar, getMaxBytesPerChar, getMetadataSafeStatement, getMultiHostSafeProxy, getNetBufferLength, getProfilerEventHandlerInstance, getQueryTimingUnits, 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, isServerTruncatesFracSecs, isServerTzUTC, lowerCaseTableNames, pingInternal, realClose, recachePreparedStatement, registerQueryExecutionTime, registerStatement, reportNumberOfTablesAccessed, serverSupportsConvertFn, setProfilerEventHandlerInstance, setReadInfoMsgEnabled, setReadOnlyInternal, shutdownServer, storesLowerCaseTableName, throwConnectionClosedException, transactionBegun, transactionCompleted, unregisterStatement, unSafeStatementInterceptors, useAnsiQuotedIdentifiersMethods inherited from interface Wrapper
isWrapperFor, unwrap
-
Constructor Details
-
ReplicationMySQLConnection
-
-
Method Details
-
getThisAsProxy
- Overrides:
getThisAsProxyin classMultiHostMySQLConnection
-
getActiveMySQLConnection
- Specified by:
getActiveMySQLConnectionin interfaceMySQLConnection- Overrides:
getActiveMySQLConnectionin classMultiHostMySQLConnection
-
getCurrentConnection
- Specified by:
getCurrentConnectionin interfaceReplicationConnection
-
getConnectionGroupId
public long getConnectionGroupId()- Specified by:
getConnectionGroupIdin interfaceReplicationConnection
-
getMasterConnection
- Specified by:
getMasterConnectionin interfaceReplicationConnection
-
promoteSlaveToMaster
- Specified by:
promoteSlaveToMasterin interfaceReplicationConnection- Throws:
SQLException
-
removeMasterHost
- Specified by:
removeMasterHostin interfaceReplicationConnection- Throws:
SQLException
-
removeMasterHost
- Specified by:
removeMasterHostin interfaceReplicationConnection- Throws:
SQLException
-
isHostMaster
- Specified by:
isHostMasterin interfaceReplicationConnection
-
getSlavesConnection
- Specified by:
getSlavesConnectionin interfaceReplicationConnection
-
addSlaveHost
- Specified by:
addSlaveHostin interfaceReplicationConnection- Throws:
SQLException
-
removeSlave
- Specified by:
removeSlavein interfaceReplicationConnection- Throws:
SQLException
-
removeSlave
- Specified by:
removeSlavein interfaceReplicationConnection- Throws:
SQLException
-
isHostSlave
- Specified by:
isHostSlavein interfaceReplicationConnection
-
setReadOnly
- Specified by:
setReadOnlyin interfaceConnection- Overrides:
setReadOnlyin classMultiHostMySQLConnection- Throws:
SQLException
-
isReadOnly
- Specified by:
isReadOnlyin interfaceConnection- Specified by:
isReadOnlyin interfaceMySQLConnection- Overrides:
isReadOnlyin classMultiHostMySQLConnection- Throws:
SQLException
-
ping
Description copied from interface:ConnectionDetect if the connection is still good by sending a ping command to the server.- Specified by:
pingin interfaceConnection- Overrides:
pingin classMultiHostMySQLConnection- Throws:
SQLException- if the ping fails
-
changeUser
Description copied from interface:ConnectionChanges the user on this connection by performing a re-authentication. If authentication fails, the connection will remain under the context of the current user.- Specified by:
changeUserin interfaceConnection- Overrides:
changeUserin classMultiHostMySQLConnection- Parameters:
userName- the username to authenticate withnewPassword- the password to authenticate with- Throws:
SQLException- if authentication fails, or some other error occurs while performing the command.
-
setStatementComment
Description copied from interface:ConnectionSets the comment that will be prepended to all statements sent to the server. Do not use slash-star or star-slash tokens in the comment as these will be added by the driver itself.- Specified by:
setStatementCommentin interfaceConnection- Overrides:
setStatementCommentin classMultiHostMySQLConnection- Parameters:
comment- the comment that will be prepended to all statements sent to the server.
-
hasSameProperties
Description copied from interface:ConnectionDoes this connection have the same properties as another?- Specified by:
hasSamePropertiesin interfaceConnection- Overrides:
hasSamePropertiesin classMultiHostMySQLConnection
-
getProperties
Description copied from interface:ConnectionReturns the parsed and passed in properties for this connection.- Specified by:
getPropertiesin interfaceConnection- Specified by:
getPropertiesin interfaceMySQLConnection- Overrides:
getPropertiesin classMultiHostMySQLConnection
-
abort
- Specified by:
abortin interfaceConnection- Specified by:
abortin interfaceConnection- Overrides:
abortin classMultiHostMySQLConnection- Throws:
SQLException
-
abortInternal
- Specified by:
abortInternalin interfaceConnection- Overrides:
abortInternalin classMultiHostMySQLConnection- Throws:
SQLException
-
getAllowMasterDownConnections
public boolean getAllowMasterDownConnections()- Specified by:
getAllowMasterDownConnectionsin interfaceConnectionProperties- Overrides:
getAllowMasterDownConnectionsin classMultiHostMySQLConnection
-
setAllowMasterDownConnections
public void setAllowMasterDownConnections(boolean connectIfMasterDown) - Specified by:
setAllowMasterDownConnectionsin interfaceConnectionProperties- Overrides:
setAllowMasterDownConnectionsin classMultiHostMySQLConnection
-
getReplicationEnableJMX
public boolean getReplicationEnableJMX()- Specified by:
getReplicationEnableJMXin interfaceConnectionProperties- Overrides:
getReplicationEnableJMXin classMultiHostMySQLConnection
-
setReplicationEnableJMX
public void setReplicationEnableJMX(boolean replicationEnableJMX) - Specified by:
setReplicationEnableJMXin interfaceConnectionProperties- Overrides:
setReplicationEnableJMXin classMultiHostMySQLConnection
-
setProxy
- Specified by:
setProxyin interfaceConnection- Specified by:
setProxyin interfaceMySQLConnection- Overrides:
setProxyin classMultiHostMySQLConnection
-