Package oracle.ucp

Interface UniversalConnectionPoolStatistics

  • All Known Subinterfaces:
    JDBCConnectionPoolStatistics, OracleJDBCConnectionPoolStatistics

    public interface UniversalConnectionPoolStatistics
    Various runtime statistics for the Universal Connection Pool. This interface provides query-only operations on all available pool statistics.

    The cumulative statistics are collected across multiple pool start/stop cycles, while the others only apply to the current running connection pool instance.

    See Also:
    UniversalConnectionPool
    • Method Detail

      • getTotalConnectionsCount

        int getTotalConnectionsCount()
        Gets the total number of connections (both available and borrowed) in the connection pool.
        Returns:
        The total number of connections (both available and borrowed) in the connection pool.
      • getAvailableConnectionsCount

        int getAvailableConnectionsCount()
        Gets the number of connections that are available in the connection pool (that is, connections in the pool that are not currently in use by clients).
        Returns:
        The number of connections that are available in the connection pool.
      • getBorrowedConnectionsCount

        int getBorrowedConnectionsCount()
        Gets the number of connections that are actively in use by clients.
        Returns:
        The number of connections that are actively in use by clients.
      • getAverageBorrowedConnectionsCount

        int getAverageBorrowedConnectionsCount()
        Gets the average number of connections that are borrowed and actively in use by clients.
        Returns:
        The number of connections that are borrowed and actively in use by clients.
      • getPeakConnectionsCount

        int getPeakConnectionsCount()
        Gets the maximum number of connections that the connection pool has reached during the life of the pool.
        Returns:
        The maximum number of connections that the connection pool has reached during the life of the pool.
      • getRemainingPoolCapacityCount

        int getRemainingPoolCapacityCount()
        Gets the number of connections that may be added to the pool before it reaches maxPoolSize.
        Returns:
        The number of connections that may be added to the pool before it reaches maxPoolSize.
      • getLabeledConnectionsCount

        int getLabeledConnectionsCount()
        Gets the number of labeled connections in the connection pool.
        Returns:
        The number of labeled connections in the connection pool.
      • getConnectionsCreatedCount

        int getConnectionsCreatedCount()
        Gets the number of connections created for this connection pool.
        Returns:
        The number of connections created for this connection pool.
      • getConnectionsClosedCount

        int getConnectionsClosedCount()
        Gets the number of connections closed by this connection pool.
        Returns:
        The number of connections closed by this connection pool.
      • getAverageConnectionWaitTime

        long getAverageConnectionWaitTime()
        Gets the average time (in milliseconds) a user thread has to wait before it could obtain a connection from the connection pool.
        Returns:
        The average time (in milliseconds) a user thread has to wait before it could obtain a connection from the connection pool.
      • getPeakConnectionWaitTime

        long getPeakConnectionWaitTime()
        Gets the longest wait (in milliseconds) a user request has to incur before obtaining a connection from the connection pool. This includes threads that waited unsuccessfully for a connection.
        Returns:
        The longest wait (in milliseconds) a user request has to incur before obtaining a connection from the connection pool.
      • getAbandonedConnectionsCount

        int getAbandonedConnectionsCount()
        Gets the number of abandoned connections that have been reclaimed.
        Returns:
        The number of abandoned connections that have been reclaimed.
      • getPendingRequestsCount

        int getPendingRequestsCount()
        Gets the number of clients that are currently waiting to obtain a connection from the pool.
        Returns:
        The number of clients that are currently waiting to obtain a connection from the pool.
      • getCumulativeConnectionWaitTime

        long getCumulativeConnectionWaitTime()
        Gets the cumulative time (in milliseconds) that connection requests have waited for connections over the life of the connection pool. This includes the time connections waited successfully and obtained a connection from the pool and those that failed waiting for a connection.
        Returns:
        The cumulative time (in milliseconds) that connection requests have waited for connections over the life of the connection pool.
      • getCumulativeConnectionBorrowedCount

        long getCumulativeConnectionBorrowedCount()
        Gets the number of connections borrowed from the connection pool over the life of the pool. This count is incremented each time a connection is borrowed.
        Returns:
        The number of connections borrowed from the connection pool over the life of the pool.
      • getCumulativeConnectionUseTime

        long getCumulativeConnectionUseTime()
        Gets the cumulative time (in milliseconds) of connections that were borrowed from the pool and remained in use.
        Returns:
        The cumulative time (in milliseconds) of connections that were borrowed from the pool and remained in use.
      • getCumulativeConnectionReturnedCount

        long getCumulativeConnectionReturnedCount()
        Gets the number of connections returned to the connection pool over the life of the pool.
        Returns:
        The number of connections returned to the connection pool over the life of the pool.
      • getCumulativeSuccessfulConnectionWaitTime

        long getCumulativeSuccessfulConnectionWaitTime()
        Gets the cumulative time (in milliseconds) that connection requests waited successfully and borrowed a connection from the pool.
        Returns:
        The cumulative time (in milliseconds) that connection requests waited successfully and borrowed a connection from the pool.
      • getCumulativeSuccessfulConnectionWaitCount

        long getCumulativeSuccessfulConnectionWaitCount()
        Gets the number of connection requests that waited successfully and borrowed a connection from the pool.
        Returns:
        The number of connection requests that waited successfully and borrowed a connection from the pool.
      • getCumulativeFailedConnectionWaitTime

        long getCumulativeFailedConnectionWaitTime()
        Gets the cumulative time (in milliseconds) that connection requests waited but failed to borrow a connection from the pool.
        Returns:
        The cumulative time (in milliseconds) that connection requests waited but failed to borrow a connection from the pool.
      • getCumulativeFailedConnectionWaitCount

        long getCumulativeFailedConnectionWaitCount()
        Gets the number of connection requests that waited unsuccessfully to borrow a connection from the pool.
        Returns:
        The number of connection requests that waited unsuccessfully to borrow a connection from the pool.
      • getShardConnectionStats

        default java.util.Map<java.lang.String,​oracle.ucp.ShardConnectionStatistics> getShardConnectionStats()
        Returns a map containing shard connection statistics object for various shards discovered by the pool so far. The ShardConnectionStatistics object contains information such as total connection count, borrowed connection count and available connection count for a shard.
        Returns:
        map containing shard connection statistics object for various shards discovered by the pool so far. A Map's key is a shard's name.
      • shortForm

        default java.lang.String shortForm()
        Get statistics in short form
        Returns:
        short form of stats as a string