Class SqlConnectionPool
java.lang.Object
ch.nolix.base.resourcecontrol.resourcepool.AbstractResourcePool<WrapperSqlConnection, AbstractSqlConnection>
ch.nolix.base.sql.connectionpool.SqlConnectionPool
- All Implemented Interfaces:
DatabaseNameHolder, HostHolder, PortHolder, SecurityModeHolder, IAuthenticationServerTarget, IDatabaseTarget, IServerTarget, UrlRepresentable, Closeable, GroupCloseable, ResourcePool<WrapperSqlConnection>, OpennessRequestable, ISqlDatabaseTarget, AutoCloseable
public final class SqlConnectionPool
extends AbstractResourcePool<WrapperSqlConnection, AbstractSqlConnection>
implements ISqlDatabaseTarget
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptiongetHost()intgetPort()toUrl()static SqlConnectionPoolwithHostAndPortAndDatabaseNameAndSqlDatabaseEngineAndLoginNameAndLoginPassword(String host, int port, String databaseName, SqlDatabaseEngine sqlDatabaseEngine, String loginName, String loginPassword) Methods inherited from class AbstractResourcePool
borrowResource, getStoredCloseController, noteCloseMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface DatabaseNameHolder
getDatabaseNameInSingleQuotesMethods inherited from interface GroupCloseable
close, createCloseDependencyTo, isClosedMethods inherited from interface OpennessRequestable
isOpen
-
Method Details
-
withHostAndPortAndDatabaseNameAndSqlDatabaseEngineAndLoginNameAndLoginPassword
public static SqlConnectionPool withHostAndPortAndDatabaseNameAndSqlDatabaseEngineAndLoginNameAndLoginPassword(String host, int port, String databaseName, SqlDatabaseEngine sqlDatabaseEngine, String loginName, String loginPassword) -
getDatabaseName
- Specified by:
getDatabaseNamein interfaceDatabaseNameHolder- Returns:
- the database name of the current
DatabaseNameHolder
-
getHost
- Specified by:
getHostin interfaceHostHolder- Returns:
- the host of the current
HostHolder
-
getLoginName
- Specified by:
getLoginNamein interfaceIAuthenticationServerTarget
-
getLoginPassword
- Specified by:
getLoginPasswordin interfaceIAuthenticationServerTarget
-
getPort
public int getPort()- Specified by:
getPortin interfacePortHolder- Returns:
- the port of the current
PortHolder
-
getSecurityMode
- Specified by:
getSecurityModein interfaceSecurityModeHolder- Returns:
- the
SecurityModeof the currentSecurityModeHolder
-
getSqlDatabaseEngine
- Specified by:
getSqlDatabaseEnginein interfaceISqlDatabaseTarget
-
toUrl
- Specified by:
toUrlin interfaceUrlRepresentable
-