public final class ConnectionPool extends Object implements AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes up connection pool and all its connections, and makes it inaccessible.
|
void |
commit(Connection conn)
Executes 'commit' command on a connection without throwing exception.
|
static ConnectionPool |
create(ConnectionPoolConfiguration configuration)
Factory method for connection pool creation.
|
Connection |
get()
Returns a connection from pool.
|
boolean |
isClosed()
If the poll is closed then this method will return true.
|
Object |
poolSize()
Returns the number of connections available in the pool.
|
void |
setDbAdaptor(DBAdaptor dbAdaptor)
Sets DB adaptor.
|
public static ConnectionPool create(ConnectionPoolConfiguration configuration)
configuration - connection pool configuration.public void setDbAdaptor(DBAdaptor dbAdaptor)
dbAdaptor - DB adaptor.public Connection get()
public void commit(Connection conn)
conn - connection for commit execution.public void close()
close in interface AutoCloseablepublic Object poolSize()
public boolean isClosed()
true if the pool is closed;
false otherwise.Copyright © 2020 CURS. All rights reserved.