Class DataSourceInfoImpl

    • Method Detail

      • getActiveConnections

        public int getActiveConnections()
        Description copied from interface: IDataSourceInfo
        Get the number of currently active connections in the pool.

        The return value is extremely transient and is a point-in-time measurement. Therefore, due to a time difference between invoking this method and IDataSourceInfo.getIdleConnections(), it is possible for the sum of idle plus active connections to be either less than or greater than the value returned by IDataSourceInfo.getTotalConnections().

        Specified by:
        getActiveConnections in interface IDataSourceInfo
        Returns:
        the current number of active (in-use) connections in the pool
      • getIdleConnections

        public int getIdleConnections()
        Description copied from interface: IDataSourceInfo
        Get the number of currently idle connections in the pool.

        The return value is extremely transient and is a point-in-time measurement. Therefore, due to a time difference between invoking this method and IDataSourceInfo.getActiveConnections(), it is possible for the sum of idle plus active connections to be either less than or greater than the value returned by IDataSourceInfo.getTotalConnections().

        Specified by:
        getIdleConnections in interface IDataSourceInfo
        Returns:
        the current number of idle connections in the pool
      • getTotalConnections

        public int getTotalConnections()
        Description copied from interface: IDataSourceInfo
        Get the total number of connections currently in the pool. The return value is transient and is a point-in-time measurement.
        Specified by:
        getTotalConnections in interface IDataSourceInfo
        Returns:
        the total number of connections in the pool
      • getThreadsAwaitingConnection

        public int getThreadsAwaitingConnection()
        Description copied from interface: IDataSourceInfo
        Get the number of threads awaiting connections from the pool. The return value is extremely transient and is a point-in-time measurement.
        Specified by:
        getThreadsAwaitingConnection in interface IDataSourceInfo
        Returns:
        the number of threads awaiting a connection from the pool
      • getStartedTimestamp

        public Instant getStartedTimestamp()
        Description copied from interface: IDataSourceInfo
        Get the timestamp of when the datasource was started.
        Specified by:
        getStartedTimestamp in interface IDataSourceInfo
        Returns:
        the timestamp of when the datasource was started
      • getLastAccessTimestamp

        public Instant getLastAccessTimestamp()
        Description copied from interface: IDataSourceInfo
        Get the timestamp of when the datasource was last accessed.
        Specified by:
        getLastAccessTimestamp in interface IDataSourceInfo
        Returns:
        the timestamp of when the datasource was last accessed
      • getUptime

        public Duration getUptime()
        Description copied from interface: IDataSourceInfo
        Get the duration for which the datasource has been up.
        Specified by:
        getUptime in interface IDataSourceInfo
        Returns:
        the duration for which the datasource has been up
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object