Class OracleDiagnosticsMXBean

  • All Implemented Interfaces:
    javax.management.DynamicMBean, javax.management.MBeanRegistration, DiagnosticsMXBean

    public class OracleDiagnosticsMXBean
    extends javax.management.StandardMBean
    implements DiagnosticsMXBean
    • Field Detail

      • EVENT_ENABLE_DIAGNOSE_FIRST_FAILURE_BY_CONN_ID_PREFIX

        public static final java.lang.String EVENT_ENABLE_DIAGNOSE_FIRST_FAILURE_BY_CONN_ID_PREFIX
        See Also:
        Constant Field Values
      • EVENT_DISABLE_DIAGNOSE_FIRST_FAILURE_BY_CONN_ID_PREFIX

        public static final java.lang.String EVENT_DISABLE_DIAGNOSE_FIRST_FAILURE_BY_CONN_ID_PREFIX
        See Also:
        Constant Field Values
      • EVENT_ENABLE_DIAGNOSE_FIRST_FAILURE_BY_TENANT_NAME

        public static final java.lang.String EVENT_ENABLE_DIAGNOSE_FIRST_FAILURE_BY_TENANT_NAME
        See Also:
        Constant Field Values
      • EVENT_DISABLE_DIAGNOSE_FIRST_FAILURE_BY_TENANT_NAME

        public static final java.lang.String EVENT_DISABLE_DIAGNOSE_FIRST_FAILURE_BY_TENANT_NAME
        See Also:
        Constant Field Values
      • EVENT_ENABLE_DIAGNOSE_FIRST_FAILURE_BY_LOGGER_NAME

        public static final java.lang.String EVENT_ENABLE_DIAGNOSE_FIRST_FAILURE_BY_LOGGER_NAME
        See Also:
        Constant Field Values
      • EVENT_DISABLE_DIAGNOSE_FIRST_FAILURE_BY_LOGGER_NAME

        public static final java.lang.String EVENT_DISABLE_DIAGNOSE_FIRST_FAILURE_BY_LOGGER_NAME
        See Also:
        Constant Field Values
      • EVENT_ENABLE_DIAGNOSE_FIRST_FAILURE

        public static final java.lang.String EVENT_ENABLE_DIAGNOSE_FIRST_FAILURE
        See Also:
        Constant Field Values
      • EVENT_DISABLE_DIAGNOSE_FIRST_FAILURE

        public static final java.lang.String EVENT_DISABLE_DIAGNOSE_FIRST_FAILURE
        See Also:
        Constant Field Values
      • EVENT_ENABLE_LOGGING_BY_CONN_ID_PREFIX

        public static final java.lang.String EVENT_ENABLE_LOGGING_BY_CONN_ID_PREFIX
        See Also:
        Constant Field Values
      • EVENT_DISABLE_LOGGING_BY_CONN_ID_PREFIX

        public static final java.lang.String EVENT_DISABLE_LOGGING_BY_CONN_ID_PREFIX
        See Also:
        Constant Field Values
      • EVENT_ENABLE_LOGGING_BY_TENANT_NAME

        public static final java.lang.String EVENT_ENABLE_LOGGING_BY_TENANT_NAME
        See Also:
        Constant Field Values
      • EVENT_DISABLE_LOGGING_BY_TENANT_NAME

        public static final java.lang.String EVENT_DISABLE_LOGGING_BY_TENANT_NAME
        See Also:
        Constant Field Values
      • EVENT_ENABLE_LOGGING_BY_LOGGER_NAME

        public static final java.lang.String EVENT_ENABLE_LOGGING_BY_LOGGER_NAME
        See Also:
        Constant Field Values
      • EVENT_DISABLE_LOGGING_BY_LOGGER_NAME

        public static final java.lang.String EVENT_DISABLE_LOGGING_BY_LOGGER_NAME
        See Also:
        Constant Field Values
      • EVENT_ENABLE_LOGGING

        public static final java.lang.String EVENT_ENABLE_LOGGING
        See Also:
        Constant Field Values
      • EVENT_DISABLE_LOGGING

        public static final java.lang.String EVENT_DISABLE_LOGGING
        See Also:
        Constant Field Values
      • EVENT_ENABLE_SENSITIVE_DIAGNOSTICS_BY_CONN_ID_PREFIX

        public static final java.lang.String EVENT_ENABLE_SENSITIVE_DIAGNOSTICS_BY_CONN_ID_PREFIX
        See Also:
        Constant Field Values
      • EVENT_DISABLE_SENSITIVE_DIAGNOSTICS_BY_CONN_ID_PREFIX

        public static final java.lang.String EVENT_DISABLE_SENSITIVE_DIAGNOSTICS_BY_CONN_ID_PREFIX
        See Also:
        Constant Field Values
      • EVENT_ENABLE_SENSITIVE_DIAGNOSTICS_BY_TENANT_NAME

        public static final java.lang.String EVENT_ENABLE_SENSITIVE_DIAGNOSTICS_BY_TENANT_NAME
        See Also:
        Constant Field Values
      • EVENT_DISABLE_SENSITIVE_DIAGNOSTICS_BY_TENANT_NAME

        public static final java.lang.String EVENT_DISABLE_SENSITIVE_DIAGNOSTICS_BY_TENANT_NAME
        See Also:
        Constant Field Values
      • EVENT_ENABLE_SENSITIVE_DIAGNOSTICS_BY_LOGGER_NAME

        public static final java.lang.String EVENT_ENABLE_SENSITIVE_DIAGNOSTICS_BY_LOGGER_NAME
        See Also:
        Constant Field Values
      • EVENT_DISABLE_SENSITIVE_DIAGNOSTICS_BY_LOGGER_NAME

        public static final java.lang.String EVENT_DISABLE_SENSITIVE_DIAGNOSTICS_BY_LOGGER_NAME
        See Also:
        Constant Field Values
      • EVENT_ENABLE_SENSITIVE_DIAGNOSTICS

        public static final java.lang.String EVENT_ENABLE_SENSITIVE_DIAGNOSTICS
        See Also:
        Constant Field Values
      • EVENT_DISABLE_SENSITIVE_DIAGNOSTICS

        public static final java.lang.String EVENT_DISABLE_SENSITIVE_DIAGNOSTICS
        See Also:
        Constant Field Values
      • EVENT_UPDATE_DIAGNOSTIC_LEVEL_BY_CONN_ID_PREFIX

        public static final java.lang.String EVENT_UPDATE_DIAGNOSTIC_LEVEL_BY_CONN_ID_PREFIX
        See Also:
        Constant Field Values
      • EVENT_UPDATE_DIAGNOSTIC_LEVEL_BY_TENANT_NAME

        public static final java.lang.String EVENT_UPDATE_DIAGNOSTIC_LEVEL_BY_TENANT_NAME
        See Also:
        Constant Field Values
      • EVENT_UPDATE_DIAGNOSTIC_LEVEL_BY_LOGGER_NAME

        public static final java.lang.String EVENT_UPDATE_DIAGNOSTIC_LEVEL_BY_LOGGER_NAME
        See Also:
        Constant Field Values
      • EVENT_UPDATE_DIAGNOSTIC_LEVEL

        public static final java.lang.String EVENT_UPDATE_DIAGNOSTIC_LEVEL
        See Also:
        Constant Field Values
      • EVENT_UPDATE_DIAGNOSE_FIRST_FAILURE_SIZE_BY_CONN_ID_PREFIX

        public static final java.lang.String EVENT_UPDATE_DIAGNOSE_FIRST_FAILURE_SIZE_BY_CONN_ID_PREFIX
        See Also:
        Constant Field Values
      • EVENT_UPDATE_DIAGNOSE_FIRST_FAILURE_SIZE_BY_TENANT_NAME

        public static final java.lang.String EVENT_UPDATE_DIAGNOSE_FIRST_FAILURE_SIZE_BY_TENANT_NAME
        See Also:
        Constant Field Values
      • EVENT_UPDATE_DIAGNOSE_FIRST_FAILURE_SIZE_BY_LOGGER_NAME

        public static final java.lang.String EVENT_UPDATE_DIAGNOSE_FIRST_FAILURE_SIZE_BY_LOGGER_NAME
        See Also:
        Constant Field Values
      • EVENT_UPDATE_DIAGNOSE_FIRST_FAILURE_SIZE

        public static final java.lang.String EVENT_UPDATE_DIAGNOSE_FIRST_FAILURE_SIZE
        See Also:
        Constant Field Values
      • EVENT_DUMP_DIAGNOSE_FIRST_FAILURE

        public static final java.lang.String EVENT_DUMP_DIAGNOSE_FIRST_FAILURE
        See Also:
        Constant Field Values
    • Method Detail

      • addPropertyChangeListener

        public static void addPropertyChangeListener​(java.beans.PropertyChangeListener propertyChangeListener)
      • removePropertyChangeListener

        public static void removePropertyChangeListener​(java.beans.PropertyChangeListener propertyChangeListener)
      • enableDiagnoseFirstFailureByConnectionIdPrefix

        public void enableDiagnoseFirstFailureByConnectionIdPrefix​(java.lang.String connectionIdPrefix)
        Description copied from interface: DiagnosticsMXBean
        Diagnose First Failure is enabled by default. This operation enables Diagnose First Failure by the given connection id prefix, if it was disabled.
        Specified by:
        enableDiagnoseFirstFailureByConnectionIdPrefix in interface DiagnosticsMXBean
      • disableDiagnoseFirstFailureByConnectionIdPrefix

        public void disableDiagnoseFirstFailureByConnectionIdPrefix​(java.lang.String connectionIdPrefix)
        Description copied from interface: DiagnosticsMXBean
        Diagnose First Failure is enabled by default. This operation disables Diagnose First Failure by the given connection id prefix.
        Specified by:
        disableDiagnoseFirstFailureByConnectionIdPrefix in interface DiagnosticsMXBean
      • enableDiagnoseFirstFailureByTenantName

        public void enableDiagnoseFirstFailureByTenantName​(java.lang.String tenantName)
        Description copied from interface: DiagnosticsMXBean
        Diagnose First Failure is enabled by default. This operation enables Diagnose First Failure by the given tenant name, if it was disabled.
        Specified by:
        enableDiagnoseFirstFailureByTenantName in interface DiagnosticsMXBean
      • disableDiagnoseFirstFailureByTenantName

        public void disableDiagnoseFirstFailureByTenantName​(java.lang.String tenantName)
        Description copied from interface: DiagnosticsMXBean
        Diagnose First Failure is enabled by default. This operation disables Diagnose First Failure by the given tenant name.
        Specified by:
        disableDiagnoseFirstFailureByTenantName in interface DiagnosticsMXBean
      • enableDiagnoseFirstFailureByLoggerName

        public void enableDiagnoseFirstFailureByLoggerName​(java.lang.String loggerName)
        Description copied from interface: DiagnosticsMXBean
        Diagnose First Failure is enabled by default. This operation enables Diagnose First Failure by the given logger name, if it was disabled.
        Specified by:
        enableDiagnoseFirstFailureByLoggerName in interface DiagnosticsMXBean
      • disableDiagnoseFirstFailureByLoggerName

        public void disableDiagnoseFirstFailureByLoggerName​(java.lang.String loggerName)
        Description copied from interface: DiagnosticsMXBean
        Diagnose First Failure is enabled by default. This operation disables Diagnose First Failure by the given logger name.
        Specified by:
        disableDiagnoseFirstFailureByLoggerName in interface DiagnosticsMXBean
      • enableDiagnoseFirstFailure

        public void enableDiagnoseFirstFailure()
        Description copied from interface: DiagnosticsMXBean
        Diagnose First Failure is enabled by default. This operation enables Diagnose First Failure, if it was disabled.
        Specified by:
        enableDiagnoseFirstFailure in interface DiagnosticsMXBean
      • enableLoggingByConnectionIdPrefix

        public void enableLoggingByConnectionIdPrefix​(java.lang.String connectionIdPrefix)
        Description copied from interface: DiagnosticsMXBean
        Logging is disabled by default. This operation enables logging by the given connection id prefix.
        Specified by:
        enableLoggingByConnectionIdPrefix in interface DiagnosticsMXBean
      • disableLoggingByConnectionIdPrefix

        public void disableLoggingByConnectionIdPrefix​(java.lang.String connectionIdPrefix)
        Description copied from interface: DiagnosticsMXBean
        Logging is disabled by default. This operation disables logging by the given connection id prefix if it was enabled.
        Specified by:
        disableLoggingByConnectionIdPrefix in interface DiagnosticsMXBean
      • enableLoggingByTenantName

        public void enableLoggingByTenantName​(java.lang.String tenantName)
        Description copied from interface: DiagnosticsMXBean
        Logging is disabled by default. This operation enables logging by the given tenant name.
        Specified by:
        enableLoggingByTenantName in interface DiagnosticsMXBean
      • disableLoggingByTenantName

        public void disableLoggingByTenantName​(java.lang.String tenantName)
        Description copied from interface: DiagnosticsMXBean
        Logging is disabled by default. This operation disables logging by the given tenant name if it was enabled.
        Specified by:
        disableLoggingByTenantName in interface DiagnosticsMXBean
      • enableLoggingByLoggerName

        public void enableLoggingByLoggerName​(java.lang.String loggerName)
        Description copied from interface: DiagnosticsMXBean
        Logging is disabled by default. This operation enables logging by the given logger name.
        Specified by:
        enableLoggingByLoggerName in interface DiagnosticsMXBean
      • disableLoggingByLoggerName

        public void disableLoggingByLoggerName​(java.lang.String loggerName)
        Description copied from interface: DiagnosticsMXBean
        Logging is disabled by default. This operation disables logging by the given logger name if it was enabled.
        Specified by:
        disableLoggingByLoggerName in interface DiagnosticsMXBean
      • disableLogging

        public void disableLogging()
        Description copied from interface: DiagnosticsMXBean
        Logging is disabled by default. This operation disables logging if it was enabled.
        Specified by:
        disableLogging in interface DiagnosticsMXBean
      • isLoggingEnabled

        public boolean isLoggingEnabled()
        Description copied from interface: DiagnosticsMXBean
        All Oracle JDBC logging code is controlled by this boolean attribute. Default is false. If turned on, log messages will be controlled by java.util.logging Levels and Filters. If turned off, no log messages will be produced.
        Specified by:
        isLoggingEnabled in interface DiagnosticsMXBean
      • enableSensitiveDiagnosticsByConnectionIdPrefix

        public void enableSensitiveDiagnosticsByConnectionIdPrefix​(java.lang.String connectionIdPrefix)
        Description copied from interface: DiagnosticsMXBean
        Sensitive diagnostics is disabled by default. This operation enables sensitive diagnostics by the given connection id prefix.
        Specified by:
        enableSensitiveDiagnosticsByConnectionIdPrefix in interface DiagnosticsMXBean
      • disableSensitiveDiagnosticsByConnectionIdPrefix

        public void disableSensitiveDiagnosticsByConnectionIdPrefix​(java.lang.String connectionIdPrefix)
        Description copied from interface: DiagnosticsMXBean
        Sensitive diagnostics is disabled by default. This operation disables sensitive diagnostics by the given connection id prefix if it was enabled.
        Specified by:
        disableSensitiveDiagnosticsByConnectionIdPrefix in interface DiagnosticsMXBean
      • enableSensitiveDiagnosticsByTenantName

        public void enableSensitiveDiagnosticsByTenantName​(java.lang.String tenantName)
        Description copied from interface: DiagnosticsMXBean
        Sensitive diagnostics is disabled by default. This operation enables sensitive diagnostics by the given tenant name.
        Specified by:
        enableSensitiveDiagnosticsByTenantName in interface DiagnosticsMXBean
      • disableSensitiveDiagnosticsByTenantName

        public void disableSensitiveDiagnosticsByTenantName​(java.lang.String tenantName)
        Description copied from interface: DiagnosticsMXBean
        Sensitive diagnostics is disabled by default. This operation disables sensitive diagnostics by the given tenant name if it was enabled.
        Specified by:
        disableSensitiveDiagnosticsByTenantName in interface DiagnosticsMXBean
      • enableSensitiveDiagnosticsByLoggerName

        public void enableSensitiveDiagnosticsByLoggerName​(java.lang.String loggerName)
        Description copied from interface: DiagnosticsMXBean
        Sensitive diagnostics is disabled by default. This operation enables sensitive diagnostics by the given logger name.
        Specified by:
        enableSensitiveDiagnosticsByLoggerName in interface DiagnosticsMXBean
      • disableSensitiveDiagnosticsByLoggerName

        public void disableSensitiveDiagnosticsByLoggerName​(java.lang.String loggerName)
        Description copied from interface: DiagnosticsMXBean
        Sensitive diagnostics is disabled by default. This operation disables sensitive diagnostics by the given logger name if it was enabled.
        Specified by:
        disableSensitiveDiagnosticsByLoggerName in interface DiagnosticsMXBean
      • disableSensitiveDiagnostics

        public void disableSensitiveDiagnostics()
        Description copied from interface: DiagnosticsMXBean
        Sensitive diagnostics is disabled by default. This operation disables sensitive diagnostics if it was enabled.
        Specified by:
        disableSensitiveDiagnostics in interface DiagnosticsMXBean
      • updateDiagnosticLevelByConnectionIdPrefix

        public void updateDiagnosticLevelByConnectionIdPrefix​(java.lang.String connectionIdPrefix,
                                                              java.lang.String loggingLevel)
        Description copied from interface: DiagnosticsMXBean
        Update the diagnostic level by the given connection id prefix. The argument string may consist of either a level name or an integer value. For example: "SEVERE" "1000"
        Specified by:
        updateDiagnosticLevelByConnectionIdPrefix in interface DiagnosticsMXBean
      • updateDiagnosticLevelByTenantName

        public void updateDiagnosticLevelByTenantName​(java.lang.String tenantName,
                                                      java.lang.String loggingLevel)
        Description copied from interface: DiagnosticsMXBean
        Update the diagnostic level by the given tenant name. The argument string may consist of either a level name or an integer value. For example: "SEVERE" "1000"
        Specified by:
        updateDiagnosticLevelByTenantName in interface DiagnosticsMXBean
      • updateDiagnosticLevelByLoggerName

        public void updateDiagnosticLevelByLoggerName​(java.lang.String loggerName,
                                                      java.lang.String loggingLevel)
        Description copied from interface: DiagnosticsMXBean
        Update the diagnostic level by the given logger name. The argument string may consist of either a level name or an integer value. For example: "SEVERE" "1000"
        Specified by:
        updateDiagnosticLevelByLoggerName in interface DiagnosticsMXBean
      • updateDiagnosticLevel

        public void updateDiagnosticLevel​(java.lang.String loggingLevel)
        Description copied from interface: DiagnosticsMXBean
        Update the diagnostic level. The argument string may consist of either a level name or an integer value. For example: "SEVERE" "1000"
        Specified by:
        updateDiagnosticLevel in interface DiagnosticsMXBean
      • updateBufferSizeByConnectionIdPrefix

        public void updateBufferSizeByConnectionIdPrefix​(java.lang.String connectionIdPrefix,
                                                         java.lang.Integer bufferSize)
        Description copied from interface: DiagnosticsMXBean
        Update in-memory Diagnose First Failure buffer size by the given connection id prefix.
        Specified by:
        updateBufferSizeByConnectionIdPrefix in interface DiagnosticsMXBean
      • updateBufferSizeByTenantName

        public void updateBufferSizeByTenantName​(java.lang.String tenantName,
                                                 java.lang.Integer bufferSize)
        Description copied from interface: DiagnosticsMXBean
        Update the in-memory buffer size of Diagnose First Failure by the given tenant name.
        Specified by:
        updateBufferSizeByTenantName in interface DiagnosticsMXBean
      • updateBufferSizeByLoggerName

        public void updateBufferSizeByLoggerName​(java.lang.String loggerName,
                                                 java.lang.Integer bufferSize)
        Description copied from interface: DiagnosticsMXBean
        Update the in-memory buffer size of Diagnose First Failure by the given logger name.
        Specified by:
        updateBufferSizeByLoggerName in interface DiagnosticsMXBean
      • updateBufferSize

        public void updateBufferSize​(java.lang.Integer bufferSize)
        Description copied from interface: DiagnosticsMXBean
        Update the in-memory buffer size of Diagnose First Failure.
        Specified by:
        updateBufferSize in interface DiagnosticsMXBean
      • readLoggingConfigFile

        public void readLoggingConfigFile​(java.lang.String configFile)
        Description copied from interface: DiagnosticsMXBean
        Reinitialize the logging properties and reread the logging configuration from the given file, which should be in java.util.Properties format.
        Specified by:
        readLoggingConfigFile in interface DiagnosticsMXBean
      • addErrorCodeToWatchList

        public void addErrorCodeToWatchList​(java.lang.String errorCode)
        Description copied from interface: DiagnosticsMXBean
        Add the error code to be watched for next occurrence in the format ORA-XXXXX. The JDBC driver writes the diagnostics of first failure in the configured log handler when an error in the watch list occurs.
        Specified by:
        addErrorCodeToWatchList in interface DiagnosticsMXBean
        Parameters:
        errorCode - An error code in the format ORA-XXXXX.
      • removeErrorCodeFromWatchList

        public void removeErrorCodeFromWatchList​(java.lang.String errorCode)
        Description copied from interface: DiagnosticsMXBean
        Remove the given error code from the watch list. The error code should be in the format ORA-XXXXX.
        Specified by:
        removeErrorCodeFromWatchList in interface DiagnosticsMXBean
        Parameters:
        errorCode - An error code in the format ORA-XXXXX.
      • showErrorCodesWatchList

        public java.lang.String showErrorCodesWatchList()
        Description copied from interface: DiagnosticsMXBean
        Show the error codes being watched.
        Specified by:
        showErrorCodesWatchList in interface DiagnosticsMXBean
        Returns:
        the set of error codes being watched are returned as String.
      • dumpDiagnoseFirstFailureWhenFutureExceptionContains

        public void dumpDiagnoseFirstFailureWhenFutureExceptionContains​(java.lang.String commaSeparatedKeywords)
        Description copied from interface: DiagnosticsMXBean
        Dump the diagnostics of first failure when the future exception, if any, contains any one of the keywords given. The example keywords are "reset", "violation".
        Specified by:
        dumpDiagnoseFirstFailureWhenFutureExceptionContains in interface DiagnosticsMXBean
        Parameters:
        commaSeparatedKeywords - The keywords as comma separated values.
      • showRecentOperations

        public java.lang.String showRecentOperations()
        Description copied from interface: DiagnosticsMXBean
        The most recent operations performed by the user on this MBean.
        Specified by:
        showRecentOperations in interface DiagnosticsMXBean
        Returns:
        description of operations
      • isWriteLogsToDiagnoseFirstFailure

        public boolean isWriteLogsToDiagnoseFirstFailure()
        Description copied from interface: DiagnosticsMXBean
        By default, logs are written to log handler. This operation can enable / disable logs writes to in-memory diagnostic buffer.
        Specified by:
        isWriteLogsToDiagnoseFirstFailure in interface DiagnosticsMXBean
      • enableMetrics

        public void enableMetrics()
        Description copied from interface: DiagnosticsMXBean
        If enabled, the JDBC driver collects metrics of events. E.g., metrics of events occur during establishing a connection to the database.
        Specified by:
        enableMetrics in interface DiagnosticsMXBean
      • clearMetrics

        public void clearMetrics()
        Description copied from interface: DiagnosticsMXBean
        Clear the metrics of events captured by the JDBC driver during establishing a connection to database.
        Specified by:
        clearMetrics in interface DiagnosticsMXBean
      • isMetricsEnabled

        public boolean isMetricsEnabled()
        Description copied from interface: DiagnosticsMXBean
        All metrics of events captured by the JDBC driver is controlled by this boolean attribute. Default is false. If enabled, the metrics of events are captured by the driver until disabled.
        Specified by:
        isMetricsEnabled in interface DiagnosticsMXBean
      • getMBeanInfo

        public javax.management.MBeanInfo getMBeanInfo()
        Specified by:
        getMBeanInfo in interface javax.management.DynamicMBean
        Overrides:
        getMBeanInfo in class javax.management.StandardMBean