Class DataSourceInfoImpl

java.lang.Object
de.xima.fc.persistence.impl.DataSourceInfoImpl
All Implemented Interfaces:
IDataSourceInfo

public final class DataSourceInfoImpl extends Object implements IDataSourceInfo
Implementation of IDataSourceInfo.
Since:
8.5.0
Author:
Norman Lorenz
  • Method Details

    • getConnectionIdentifier

      public ConnectionIdentifier getConnectionIdentifier()
      Description copied from interface: IDataSourceInfo
      Get the connection identifier associated with this DataSource.
      Specified by:
      getConnectionIdentifier in interface IDataSourceInfo
      Returns:
      the connection identifier
    • 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
    • getJdbcUrl

      public String getJdbcUrl()
      Description copied from interface: IDataSourceInfo
      Get the JDBC URL used by this DataSource.
      Specified by:
      getJdbcUrl in interface IDataSourceInfo
      Returns:
      the JDBC URL
    • 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
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object