Package de.xima.fc.persistence
Interface IDataSourceInfo
-
- All Known Implementing Classes:
DataSourceInfoImpl
public interface IDataSourceInfoInformation about aDataSource's runtime state, such as the number of active and idle connections.- Since:
- 8.5.0
- Author:
- Norman Lorenz
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description intgetActiveConnections()Get the number of currently active connections in the pool.ConnectionIdentifiergetConnectionIdentifier()Get the connection identifier associated with this DataSource.default DbmsgetDbms()Gets the dbms type associated with this DataSource.default StringgetDisplayName()Get a display name for 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.default booleanisSystemDb()Check if this DataSource is for the system database.
-
-
-
Method Detail
-
getActiveConnections
int getActiveConnections()
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
getIdleConnections(), it is possible for the sum of idle plus active connections to be either less than or greater than the value returned bygetTotalConnections().- Returns:
- the current number of active (in-use) connections in the pool
-
getConnectionIdentifier
ConnectionIdentifier getConnectionIdentifier()
Get the connection identifier associated with this DataSource.- Returns:
- the connection identifier
-
getDisplayName
default String getDisplayName()
Get a display name for this DataSource.- Returns:
- a display name for this DataSource
-
getIdleConnections
int getIdleConnections()
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
getActiveConnections(), it is possible for the sum of idle plus active connections to be either less than or greater than the value returned bygetTotalConnections().- Returns:
- the current number of idle connections in the pool
-
getJdbcUrl
String getJdbcUrl()
Get the JDBC URL used by this DataSource.- Returns:
- the JDBC URL
-
getLastAccessTimestamp
Instant getLastAccessTimestamp()
Get the timestamp of when the datasource was last accessed.- Returns:
- the timestamp of when the datasource was last accessed
-
getStartedTimestamp
Instant getStartedTimestamp()
Get the timestamp of when the datasource was started.- Returns:
- the timestamp of when the datasource was started
-
getThreadsAwaitingConnection
int getThreadsAwaitingConnection()
Get the number of threads awaiting connections from the pool. The return value is extremely transient and is a point-in-time measurement.- Returns:
- the number of threads awaiting a connection from the pool
-
getTotalConnections
int getTotalConnections()
Get the total number of connections currently in the pool. The return value is transient and is a point-in-time measurement.- Returns:
- the total number of connections in the pool
-
getUptime
Duration getUptime()
Get the duration for which the datasource has been up.- Returns:
- the duration for which the datasource has been up
-
getDbms
default Dbms getDbms()
Gets the dbms type associated with this DataSource.- Returns:
- the dbms type associated with this DataSource
-
isSystemDb
default boolean isSystemDb()
Check if this DataSource is for the system database.- Returns:
- true if this DataSource is for the system database, false otherwise
-
-