Package de.xima.fc.persistence.impl
Class DataSourceInfoImpl
- java.lang.Object
-
- de.xima.fc.persistence.impl.DataSourceInfoImpl
-
- All Implemented Interfaces:
IDataSourceInfo
public final class DataSourceInfoImpl extends Object implements IDataSourceInfo
Implementation ofIDataSourceInfo.- Since:
- 8.5.0
- Author:
- Norman Lorenz
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)intgetActiveConnections()Get the number of currently active connections in the pool.ConnectionIdentifiergetConnectionIdentifier()Get the connection identifier associated with this DataSource.intgetIdleConnections()Get the number of currently idle connections in the pool.StringgetJdbcUrl()Get the JDBC URL used by this DataSource.InstantgetLastAccessTimestamp()Get the timestamp of when the datasource was last accessed.InstantgetStartedTimestamp()Get the timestamp of when the datasource was started.intgetThreadsAwaitingConnection()Get the number of threads awaiting connections from the pool.intgetTotalConnections()Get the total number of connections currently in the pool.DurationgetUptime()Get the duration for which the datasource has been up.inthashCode()StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.xima.fc.persistence.IDataSourceInfo
getDbms, getDisplayName, isSystemDb
-
-
-
-
Method Detail
-
getConnectionIdentifier
public ConnectionIdentifier getConnectionIdentifier()
Description copied from interface:IDataSourceInfoGet the connection identifier associated with this DataSource.- Specified by:
getConnectionIdentifierin interfaceIDataSourceInfo- Returns:
- the connection identifier
-
getActiveConnections
public int getActiveConnections()
Description copied from interface:IDataSourceInfoGet 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 byIDataSourceInfo.getTotalConnections().- Specified by:
getActiveConnectionsin interfaceIDataSourceInfo- Returns:
- the current number of active (in-use) connections in the pool
-
getIdleConnections
public int getIdleConnections()
Description copied from interface:IDataSourceInfoGet 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 byIDataSourceInfo.getTotalConnections().- Specified by:
getIdleConnectionsin interfaceIDataSourceInfo- Returns:
- the current number of idle connections in the pool
-
getTotalConnections
public int getTotalConnections()
Description copied from interface:IDataSourceInfoGet the total number of connections currently in the pool. The return value is transient and is a point-in-time measurement.- Specified by:
getTotalConnectionsin interfaceIDataSourceInfo- Returns:
- the total number of connections in the pool
-
getJdbcUrl
public String getJdbcUrl()
Description copied from interface:IDataSourceInfoGet the JDBC URL used by this DataSource.- Specified by:
getJdbcUrlin interfaceIDataSourceInfo- Returns:
- the JDBC URL
-
getThreadsAwaitingConnection
public int getThreadsAwaitingConnection()
Description copied from interface:IDataSourceInfoGet the number of threads awaiting connections from the pool. The return value is extremely transient and is a point-in-time measurement.- Specified by:
getThreadsAwaitingConnectionin interfaceIDataSourceInfo- Returns:
- the number of threads awaiting a connection from the pool
-
getStartedTimestamp
public Instant getStartedTimestamp()
Description copied from interface:IDataSourceInfoGet the timestamp of when the datasource was started.- Specified by:
getStartedTimestampin interfaceIDataSourceInfo- Returns:
- the timestamp of when the datasource was started
-
getLastAccessTimestamp
public Instant getLastAccessTimestamp()
Description copied from interface:IDataSourceInfoGet the timestamp of when the datasource was last accessed.- Specified by:
getLastAccessTimestampin interfaceIDataSourceInfo- Returns:
- the timestamp of when the datasource was last accessed
-
getUptime
public Duration getUptime()
Description copied from interface:IDataSourceInfoGet the duration for which the datasource has been up.- Specified by:
getUptimein interfaceIDataSourceInfo- Returns:
- the duration for which the datasource has been up
-
-