public interface ConnectionPoolComponent
| Modifier and Type | Method and Description |
|---|---|
PoolableConnection |
getConnection(com.speedment.runtime.config.Dbms dbms)
Returns a {link PoolableConnection} from this connection pool.
|
PoolableConnection |
getConnection(String uri,
String username,
char[] password)
Returns a {link PoolableConnection} from this connection pool.
|
long |
getMaxAge()
Returns the maximum age for recyclable connections.
|
int |
getMaxRetainSize()
Returns the maximum number of connection this pool will retain when
connections are returned.
|
int |
leaseSize()
Returns the current number of leased connections from the pool.
|
Connection |
newConnection(com.speedment.runtime.config.Dbms dbms)
Creates and returns a new
Connection for the given parameters. |
Connection |
newConnection(String uri,
String username,
char[] password)
Creates and returns a new
Connection for the given parameters. |
int |
poolSize()
Returns the current number of idle connections in the pool.
|
void |
returnConnection(PoolableConnection connection)
Returns a
PoolableConnection to the pool. |
PoolableConnection getConnection(String uri, String username, char[] password)
uri - the connection URI for the connectorusername - the user for the connectorpassword - the password for the connectorPoolableConnection from this connection poolPoolableConnection getConnection(com.speedment.runtime.config.Dbms dbms)
dbms - the dbms to connect toPoolableConnection from this connection poolConnection newConnection(String uri, String username, char[] password)
Connection for the given parameters.
This method is called whenever the pool needs to allocate a new
Connection.uri - the connection URI for the connectorusername - the user for the connectorpassword - the password for the connectorConnection for the given parametersConnection newConnection(com.speedment.runtime.config.Dbms dbms)
Connection for the given parameters.
This method is called whenever the pool needs to allocate a new
Connection.dbms - the dbms to connect toConnection for the given parametersvoid returnConnection(PoolableConnection connection)
PoolableConnection to the pool. If the
PoolableConnection has expired or has a closed underlying connection, it
will be discarded from the pool.connection - to return to the poolint poolSize()
int leaseSize()
int getMaxRetainSize()
long getMaxAge()
Copyright © 2019 Speedment, Inc.. All rights reserved.