Interface DiagnosticsMXBean

  • All Known Implementing Classes:
    OracleDiagnosticsMXBean

    @MXBean
    public interface DiagnosticsMXBean
    Interface for Diagnostics MBean operations.
    • Method Detail

      • enableDiagnoseFirstFailureByConnectionIdPrefix

        void enableDiagnoseFirstFailureByConnectionIdPrefix​(java.lang.String connectionIdPrefix)
        Diagnose First Failure is enabled by default. This operation enables Diagnose First Failure by the given connection id prefix, if it was disabled.
        Parameters:
        connectionIdPrefix -
      • disableDiagnoseFirstFailureByConnectionIdPrefix

        void disableDiagnoseFirstFailureByConnectionIdPrefix​(java.lang.String connectionIdPrefix)
        Diagnose First Failure is enabled by default. This operation disables Diagnose First Failure by the given connection id prefix.
        Parameters:
        connectionIdPrefix -
      • enableDiagnoseFirstFailureByTenantName

        void enableDiagnoseFirstFailureByTenantName​(java.lang.String tenantName)
        Diagnose First Failure is enabled by default. This operation enables Diagnose First Failure by the given tenant name, if it was disabled.
        Parameters:
        tenantName -
      • disableDiagnoseFirstFailureByTenantName

        void disableDiagnoseFirstFailureByTenantName​(java.lang.String tenantName)
        Diagnose First Failure is enabled by default. This operation disables Diagnose First Failure by the given tenant name.
        Parameters:
        tenantName -
      • enableDiagnoseFirstFailureByLoggerName

        void enableDiagnoseFirstFailureByLoggerName​(java.lang.String loggerName)
        Diagnose First Failure is enabled by default. This operation enables Diagnose First Failure by the given logger name, if it was disabled.
        Parameters:
        loggerName -
      • disableDiagnoseFirstFailureByLoggerName

        void disableDiagnoseFirstFailureByLoggerName​(java.lang.String loggerName)
        Diagnose First Failure is enabled by default. This operation disables Diagnose First Failure by the given logger name.
        Parameters:
        loggerName -
      • enableDiagnoseFirstFailure

        void enableDiagnoseFirstFailure()
        Diagnose First Failure is enabled by default. This operation enables Diagnose First Failure, if it was disabled.
      • disableDiagnoseFirstFailure

        void disableDiagnoseFirstFailure()
        Diagnose First Failure is enabled by default. This operation disables Diagnose First Failure.
      • enableLoggingByConnectionIdPrefix

        void enableLoggingByConnectionIdPrefix​(java.lang.String connectionIdPrefix)
        Logging is disabled by default. This operation enables logging by the given connection id prefix.
        Parameters:
        connectionIdPrefix -
      • disableLoggingByConnectionIdPrefix

        void disableLoggingByConnectionIdPrefix​(java.lang.String connectionIdPrefix)
        Logging is disabled by default. This operation disables logging by the given connection id prefix if it was enabled.
        Parameters:
        connectionIdPrefix -
      • enableLoggingByTenantName

        void enableLoggingByTenantName​(java.lang.String tenantName)
        Logging is disabled by default. This operation enables logging by the given tenant name.
        Parameters:
        tenantName -
      • disableLoggingByTenantName

        void disableLoggingByTenantName​(java.lang.String tenantName)
        Logging is disabled by default. This operation disables logging by the given tenant name if it was enabled.
        Parameters:
        tenantName -
      • enableLoggingByLoggerName

        void enableLoggingByLoggerName​(java.lang.String loggerName)
        Logging is disabled by default. This operation enables logging by the given logger name.
        Parameters:
        loggerName -
      • disableLoggingByLoggerName

        void disableLoggingByLoggerName​(java.lang.String loggerName)
        Logging is disabled by default. This operation disables logging by the given logger name if it was enabled.
        Parameters:
        loggerName -
      • enableLogging

        void enableLogging()
        Logging is disabled by default. This operation enables logging.
      • disableLogging

        void disableLogging()
        Logging is disabled by default. This operation disables logging if it was enabled.
      • isLoggingEnabled

        boolean isLoggingEnabled()
        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.
      • enableSensitiveDiagnosticsByConnectionIdPrefix

        void enableSensitiveDiagnosticsByConnectionIdPrefix​(java.lang.String connectionIdPrefix)
        Sensitive diagnostics is disabled by default. This operation enables sensitive diagnostics by the given connection id prefix.
        Parameters:
        connectionIdPrefix -
      • disableSensitiveDiagnosticsByConnectionIdPrefix

        void disableSensitiveDiagnosticsByConnectionIdPrefix​(java.lang.String connectionIdPrefix)
        Sensitive diagnostics is disabled by default. This operation disables sensitive diagnostics by the given connection id prefix if it was enabled.
        Parameters:
        connectionIdPrefix -
      • enableSensitiveDiagnosticsByTenantName

        void enableSensitiveDiagnosticsByTenantName​(java.lang.String tenantName)
        Sensitive diagnostics is disabled by default. This operation enables sensitive diagnostics by the given tenant name.
        Parameters:
        tenantName -
      • disableSensitiveDiagnosticsByTenantName

        void disableSensitiveDiagnosticsByTenantName​(java.lang.String tenantName)
        Sensitive diagnostics is disabled by default. This operation disables sensitive diagnostics by the given tenant name if it was enabled.
        Parameters:
        tenantName -
      • enableSensitiveDiagnosticsByLoggerName

        void enableSensitiveDiagnosticsByLoggerName​(java.lang.String loggerName)
        Sensitive diagnostics is disabled by default. This operation enables sensitive diagnostics by the given logger name.
        Parameters:
        loggerName -
      • disableSensitiveDiagnosticsByLoggerName

        void disableSensitiveDiagnosticsByLoggerName​(java.lang.String loggerName)
        Sensitive diagnostics is disabled by default. This operation disables sensitive diagnostics by the given logger name if it was enabled.
        Parameters:
        loggerName -
      • enableSensitiveDiagnostics

        void enableSensitiveDiagnostics()
        Sensitive diagnostics is disabled by default. This operation enables sensitive diagnostics.
      • disableSensitiveDiagnostics

        void disableSensitiveDiagnostics()
        Sensitive diagnostics is disabled by default. This operation disables sensitive diagnostics if it was enabled.
      • updateDiagnosticLevelByConnectionIdPrefix

        void updateDiagnosticLevelByConnectionIdPrefix​(java.lang.String connectionIdPrefix,
                                                       java.lang.String level)
        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"
        Parameters:
        connectionIdPrefix -
        level -
      • updateDiagnosticLevelByTenantName

        void updateDiagnosticLevelByTenantName​(java.lang.String tenantName,
                                               java.lang.String level)
        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"
        Parameters:
        connectionIdPrefix -
        level -
      • updateDiagnosticLevelByLoggerName

        void updateDiagnosticLevelByLoggerName​(java.lang.String loggerName,
                                               java.lang.String level)
        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"
        Parameters:
        connectionIdPrefix -
        level -
      • updateDiagnosticLevel

        void updateDiagnosticLevel​(java.lang.String level)
        Update the diagnostic level. The argument string may consist of either a level name or an integer value. For example: "SEVERE" "1000"
        Parameters:
        connectionIdPrefix -
        level -
      • updateBufferSizeByConnectionIdPrefix

        void updateBufferSizeByConnectionIdPrefix​(java.lang.String connectionIdPrefix,
                                                  java.lang.Integer bufferSize)
        Update in-memory Diagnose First Failure buffer size by the given connection id prefix.
        Parameters:
        connectionIdPrefix -
        bufferSize -
      • updateBufferSizeByTenantName

        void updateBufferSizeByTenantName​(java.lang.String tenantName,
                                          java.lang.Integer bufferSize)
        Update the in-memory buffer size of Diagnose First Failure by the given tenant name.
        Parameters:
        tenantName -
        bufferSize -
      • updateBufferSizeByLoggerName

        void updateBufferSizeByLoggerName​(java.lang.String loggerName,
                                          java.lang.Integer bufferSize)
        Update the in-memory buffer size of Diagnose First Failure by the given logger name.
        Parameters:
        loggerName -
        bufferSize -
      • updateBufferSize

        void updateBufferSize​(java.lang.Integer bufferSize)
        Update the in-memory buffer size of Diagnose First Failure.
        Parameters:
        bufferSize -
      • readLoggingConfigFile

        void readLoggingConfigFile​(java.lang.String configFile)
        Reinitialize the logging properties and reread the logging configuration from the given file, which should be in java.util.Properties format.
        Parameters:
        configFile -
      • addErrorCodeToWatchList

        void addErrorCodeToWatchList​(java.lang.String errorCode)
        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.
        Parameters:
        errorCode - An error code in the format ORA-XXXXX.
      • removeErrorCodeFromWatchList

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

        java.lang.String showErrorCodesWatchList()
        Show the error codes being watched.
        Returns:
        the set of error codes being watched are returned as String.
      • resetErrorCodeWatchList

        void resetErrorCodeWatchList()
        Configure the watch list with the default error codes. To get the list of error codes being watched, invoke showErrorCodesWatchList().
      • dumpDiagnoseFirstFailure

        void dumpDiagnoseFirstFailure()
        Dump the diagnostics of first failure to the target handler.
      • dumpDiagnoseFirstFailureWhenFutureExceptionContains

        void dumpDiagnoseFirstFailureWhenFutureExceptionContains​(java.lang.String commaSeparatedKeywords)
        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".
        Parameters:
        commaSeparatedKeywords - The keywords as comma separated values.
      • showRecentOperations

        java.lang.String showRecentOperations()
        The most recent operations performed by the user on this MBean.
        Returns:
        description of operations
      • enableWriteLogsToDiagnoseFirstFailure

        void enableWriteLogsToDiagnoseFirstFailure​(java.lang.Boolean enabled)
        Write logs to in-memory diagnostic buffer.
        Parameters:
        enabled -
      • isWriteLogsToDiagnoseFirstFailure

        boolean isWriteLogsToDiagnoseFirstFailure()
        By default, logs are written to log handler. This operation can enable / disable logs writes to in-memory diagnostic buffer.
      • enableMetrics

        void enableMetrics()
        If enabled, the JDBC driver collects metrics of events. E.g., metrics of events occur during establishing a connection to the database.
      • disableMetrics

        void disableMetrics()
        If disabled, the JDBC driver does not collect metrics of events.
      • showMetrics

        java.lang.String showMetrics()
        Show the captured timing metrics. Capturing metrics is disabled by default. To enable, call enableMetrics().
        Returns:
        the captured metrics report
      • clearMetrics

        void clearMetrics()
        Clear the metrics of events captured by the JDBC driver during establishing a connection to database.
      • isMetricsEnabled

        boolean isMetricsEnabled()
        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.