Package oracle.jdbc.diagnostics
Interface DiagnosticsMXBean
-
- All Known Implementing Classes:
OracleDiagnosticsMXBean
@MXBean public interface DiagnosticsMXBean
Interface for Diagnostics MBean operations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addErrorCodeToWatchList(java.lang.String errorCode)
Add the error code to be watched for next occurrence in the format ORA-XXXXX.void
clearExceptionKeywords()
Clear the keywords that were previously added by invoking operationdumpDiagnoseFirstFailureWhenFutureExceptionContains(String)
.void
clearMetrics()
Clear the metrics of events captured by the JDBC driver during establishing a connection to database.void
disableDiagnoseFirstFailure()
Diagnose First Failure is enabled by default.void
disableDiagnoseFirstFailureByConnectionIdPrefix(java.lang.String connectionIdPrefix)
Diagnose First Failure is enabled by default.void
disableDiagnoseFirstFailureByLoggerName(java.lang.String loggerName)
Diagnose First Failure is enabled by default.void
disableDiagnoseFirstFailureByTenantName(java.lang.String tenantName)
Diagnose First Failure is enabled by default.void
disableLogging()
Logging is disabled by default.void
disableLoggingByConnectionIdPrefix(java.lang.String connectionIdPrefix)
Logging is disabled by default.void
disableLoggingByLoggerName(java.lang.String loggerName)
Logging is disabled by default.void
disableLoggingByTenantName(java.lang.String tenantName)
Logging is disabled by default.void
disableMetrics()
If disabled, the JDBC driver does not collect metrics of events.void
disableSensitiveDiagnostics()
Sensitive diagnostics is disabled by default.void
disableSensitiveDiagnosticsByConnectionIdPrefix(java.lang.String connectionIdPrefix)
Sensitive diagnostics is disabled by default.void
disableSensitiveDiagnosticsByLoggerName(java.lang.String loggerName)
Sensitive diagnostics is disabled by default.void
disableSensitiveDiagnosticsByTenantName(java.lang.String tenantName)
Sensitive diagnostics is disabled by default.void
dumpDiagnoseFirstFailure()
Dump the diagnostics of first failure to the target handler.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.void
enableDiagnoseFirstFailure()
Diagnose First Failure is enabled by default.void
enableDiagnoseFirstFailureByConnectionIdPrefix(java.lang.String connectionIdPrefix)
Diagnose First Failure is enabled by default.void
enableDiagnoseFirstFailureByLoggerName(java.lang.String loggerName)
Diagnose First Failure is enabled by default.void
enableDiagnoseFirstFailureByTenantName(java.lang.String tenantName)
Diagnose First Failure is enabled by default.void
enableLogging()
Logging is disabled by default.void
enableLoggingByConnectionIdPrefix(java.lang.String connectionIdPrefix)
Logging is disabled by default.void
enableLoggingByLoggerName(java.lang.String loggerName)
Logging is disabled by default.void
enableLoggingByTenantName(java.lang.String tenantName)
Logging is disabled by default.void
enableMetrics()
If enabled, the JDBC driver collects metrics of events.void
enableSensitiveDiagnostics()
Sensitive diagnostics is disabled by default.void
enableSensitiveDiagnosticsByConnectionIdPrefix(java.lang.String connectionIdPrefix)
Sensitive diagnostics is disabled by default.void
enableSensitiveDiagnosticsByLoggerName(java.lang.String loggerName)
Sensitive diagnostics is disabled by default.void
enableSensitiveDiagnosticsByTenantName(java.lang.String tenantName)
Sensitive diagnostics is disabled by default.void
enableWriteLogsToDiagnoseFirstFailure(java.lang.Boolean enabled)
Write logs to in-memory diagnostic buffer.boolean
isLoggingEnabled()
All Oracle JDBC logging code is controlled by this boolean attribute.boolean
isMetricsEnabled()
All metrics of events captured by the JDBC driver is controlled by this boolean attribute.boolean
isWriteLogsToDiagnoseFirstFailure()
By default, logs are written to log handler.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.void
removeErrorCodeFromWatchList(java.lang.String errorCode)
Remove the given error code from the watch list.void
resetErrorCodeWatchList()
Configure the watch list with the default error codes.java.lang.String
showErrorCodesWatchList()
Show the error codes being watched.java.lang.String
showExceptionKeywords()
Show the keywords that were previously added by invoking operationdumpDiagnoseFirstFailureWhenFutureExceptionContains(String)
.java.lang.String
showMetrics()
Show the captured timing metrics.java.lang.String
showRecentOperations()
The most recent operations performed by the user on this MBean.void
updateBufferSize(java.lang.Integer bufferSize)
Update the in-memory buffer size of Diagnose First Failure.void
updateBufferSizeByConnectionIdPrefix(java.lang.String connectionIdPrefix, java.lang.Integer bufferSize)
Update in-memory Diagnose First Failure buffer size by the given connection id prefix.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.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.void
updateDiagnosticLevel(java.lang.String level)
Update the diagnostic level.void
updateDiagnosticLevelByConnectionIdPrefix(java.lang.String connectionIdPrefix, java.lang.String level)
Update the diagnostic level by the given connection id prefix.void
updateDiagnosticLevelByLoggerName(java.lang.String loggerName, java.lang.String level)
Update the diagnostic level by the given logger name.void
updateDiagnosticLevelByTenantName(java.lang.String tenantName, java.lang.String level)
Update the diagnostic level by the given tenant name.
-
-
-
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, invokeshowErrorCodesWatchList()
.
-
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.
-
showExceptionKeywords
java.lang.String showExceptionKeywords()
Show the keywords that were previously added by invoking operationdumpDiagnoseFirstFailureWhenFutureExceptionContains(String)
.- Returns:
- the keywords
-
showRecentOperations
java.lang.String showRecentOperations()
The most recent operations performed by the user on this MBean.- Returns:
- description of operations
-
clearExceptionKeywords
void clearExceptionKeywords()
Clear the keywords that were previously added by invoking operationdumpDiagnoseFirstFailureWhenFutureExceptionContains(String)
.
-
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, callenableMetrics()
.- 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.
-
-