Interface OracleDataSource

    • Method Detail

      • registerConnectionInitializationCallback

        void registerConnectionInitializationCallback​(oracle.jdbc.replay.internal.ConnectionInitializationCallback cbk)
                                               throws SQLException
        Registers a connection initialization callback.
        Parameters:
        cbk - The ConnectionInitializationCallback object to be registered.
        Throws:
        SQLException - If there is a callback already registered with the pool.
      • unregisterConnectionInitializationCallback

        void unregisterConnectionInitializationCallback​(oracle.jdbc.replay.internal.ConnectionInitializationCallback cbk)
                                                 throws SQLException
        Unregisters a specified connection initialization callback.
        Parameters:
        cbk - The ConnectionInitializationCallback object to be unregistered.
        Throws:
        SQLException - If callback removal fails.
      • getConnectionInitializationCallback

        oracle.jdbc.replay.internal.ConnectionInitializationCallback getConnectionInitializationCallback()
        Obtains the registered connection initialization callback, if any.
        Returns:
        The registered ConnectionInitializationCallback, or null if there is no callback registered.
      • setMaxStatements

        void setMaxStatements​(int max)
                       throws SQLException
        Specifies the value of the maxStatements property. This is the size of the statement cache used by both implicit and explicit caching. This value does not apply to the statement cache size of connections created by ImplicitStatementCache for which the cache size is set through a java.util.Properties object.
        Specified by:
        setMaxStatements in interface OracleCommonDataSource
        Parameters:
        max - Requested size of the cache. If the existing cache size is less than max, statements will be purged to reduce the size.
        Throws:
        SQLException - if max < 0
      • setImplicitCachingEnabled

        void setImplicitCachingEnabled​(boolean cache)
                                throws SQLException
        Sets the value of the implicitCachingEnabled property, which enables or disables the implicit statement cache. Note that this is independent of the cache size that is set with setMaxStatements().
        Specified by:
        setImplicitCachingEnabled in interface OracleCommonDataSource
        Parameters:
        cache - If true, then implicit caching is enabled. If false, then any existing statement is purged and the implicit caching is disabled.
        Throws:
        SQLException
      • setExplicitCachingEnabled

        void setExplicitCachingEnabled​(boolean cache)
                                throws SQLException
        Sets the value of the explicitCachingEnabled property, which enables or disables the explicit cache. Note that this is independent of the cache size, which is set with setMaxStatements().
        Specified by:
        setExplicitCachingEnabled in interface OracleCommonDataSource
        Parameters:
        cache - If true, then explicit caching is enabled. If false, then any existing statement is purged and the explicit caching is disabled.
        Throws:
        SQLException - if called on a logical connection.
      • getReplayStatistics

        ReplayStatistics getReplayStatistics()
        Obtains replay statistics accumulated so far. These reflect replay actions across all the connections created by this data source. It is recommended that this call be made when the connections are quiescent and there are few new connections being opened.
        Returns:
        A replay statistics object containing all the metrics.
      • clearReplayStatistics

        void clearReplayStatistics()
        Clears replay statistics accumulated so far on all connection created by this data source. It is recommended that this call be made when the connections are quiescent and there are few new connections being opened.