Package oracle.jdbc.replay
Interface ReplayableConnection
-
public interface ReplayableConnection
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ReplayableConnection.StatisticsReportType
Statistics report type.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
beginRequest()
Declares that a request to the server is starting on this connection.void
clearReplayStatistics(ReplayableConnection.StatisticsReportType reportType)
Clears replay statistics accumulated so far.void
disableReplay()
Allows disabling replay at runtime on a per-connection basis.void
endRequest()
Declares that the request that was in progress on this connection has completed.ReplayStatistics
getReplayStatistics(ReplayableConnection.StatisticsReportType reportType)
Obtains replay statistics accumulated so far.
-
-
-
Method Detail
-
beginRequest
void beginRequest() throws SQLException
Declares that a request to the server is starting on this connection. When called after another beginRequest() but before an endRequest(), this call is a no-op and does not throw any exception. Therefore, application is allowed to call beginRequest after a connection pool checkout, which implicitly calls beginRequest.- Throws:
SQLException
- When called with an open transaction on this connection.
-
endRequest
void endRequest() throws SQLException
Declares that the request that was in progress on this connection has completed. Existing connection labels and state on the connection are not affected by this call. Calling endRequest() multiple times without beginRequest() in-between is allowed.- Throws:
SQLException
- When called with an open transaction on this connection.
-
disableReplay
void disableReplay() throws SQLException
Allows disabling replay at runtime on a per-connection basis. This does not affect replay that is already in-progress.- Throws:
SQLException
-
getReplayStatistics
ReplayStatistics getReplayStatistics(ReplayableConnection.StatisticsReportType reportType)
Obtains replay statistics accumulated so far. These reflect either replay actions on the current connection, or across all the connections created by the underlying data source. When the argument value is false, it is recommended that the call be made when there are few new connections opened.- Parameters:
reportType
- The type of statistics report.- Returns:
- A replay statistics object containing all the metrics.
- See Also:
ReplayStatistics#StatisticsReportType
,OracleDataSource.getReplayStatistics()
-
clearReplayStatistics
void clearReplayStatistics(ReplayableConnection.StatisticsReportType reportType)
Clears replay statistics accumulated so far. This can be done on a per-connection basis, or applied to all connections. Future statistics reporting only reflects statistics updates accumulated after the latest clearing.- Parameters:
reportType
- The type of statistics report.- See Also:
ReplayStatistics#StatisticsReportType
,ReplayStatistics#getReplayStatistics()
-
-