public final class ConnectionProviderPooled extends Object implements ConnectionProvider
Constructor and Description |
---|
ConnectionProviderPooled(String url,
int minPoolSize,
int maxPoolSize)
Constructor.
|
ConnectionProviderPooled(String url,
String username,
String password,
int minPoolSize,
int maxPoolSize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the connection provider and releases its resources.
|
Connection |
get()
Returns a new
Connection (perhaps from a Connection pool). |
public ConnectionProviderPooled(String url, int minPoolSize, int maxPoolSize)
url
- minPoolSize
- maxPoolSize
- public ConnectionProviderPooled(String url, String username, String password, int minPoolSize, int maxPoolSize)
url
- jdbc urlusername
- database login usernamepassword
- database login passwordminPoolSize
- minimum size of the connection poolmaxPoolSize
- maximum size of the connection poolpublic Connection get()
ConnectionProvider
Connection
(perhaps from a Connection pool).get
in interface ConnectionProvider
public void close()
ConnectionProvider
close
in interface ConnectionProvider
Copyright © 2014–2015. All rights reserved.