public class MyPool extends Object implements IConnectionPool
| 构造器和说明 |
|---|
MyPool(String databaseType,
ResourceBundle rb)
根据配置文件.
|
MyPool(String database,
String configurefile)
Instantiates a new my pool.
|
MyPool(String driverName,
String passwd,
String username,
String jdbcURL)
Instantiates a new my pool.
|
MyPool(String drivername,
String jdbcurl,
String username,
String password,
String packagename,
String path,
int connectionSize)
�����̳߳�.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
�ر���������.
|
Connection |
getConnection()
�����ӳػ��һ����������.
|
Connection |
getConnection(long timeout)
�����ӳػ�ȡ��������.
|
String |
getDatabase()
Gets the database.
|
String |
getDriverName()
Gets the driver name.
|
String |
getGwt_base()
Gets the gwt base.
|
String |
getGwtbase()
Gets the gwtbase.
|
static MyPool |
getInstance()
Gets the single instance of MyPool.
|
static MyPool |
getInstance(String database)
Gets the single instance of MyPool.
|
static MyPool |
getInstance(String database,
String configurefile)
Gets the single instance of MyPool.
|
String |
getJdbcURL()
Gets the jdbc URL.
|
int |
getMaxConnections()
Gets the max connections.
|
String |
getNetPath()
Gets the net path.
|
String |
getPackage()
Gets the package.
|
String |
getPasswd()
Gets the passwd.
|
String |
getPath()
Gets the path.
|
String |
getUsername()
Gets the username.
|
void |
log(String msg)
Log.
|
void |
releaseConnection(Connection con)
������ʹ�õ����ӷ��ظ����ӳ�.
|
void |
setDatabase(String database)
Sets the database.
|
void |
setDriverName(String driverName)
Sets the driver name.
|
void |
setGwt_base(String gwt_base)
Sets the gwt base.
|
void |
setJdbcURL(String jdbcURL)
Sets the jdbc URL.
|
void |
setMaxConnections(int maxConnections)
Sets the max connections.
|
void |
setNetPath(String netPath)
Sets the net path.
|
void |
setPackage(String pack)
Sets the package.
|
void |
setPasswd(String passwd)
Sets the passwd.
|
void |
setPath(String path)
Sets the path.
|
void |
setUsername(String username)
Sets the username.
|
public MyPool(String drivername, String jdbcurl, String username, String password, String packagename, String path, int connectionSize)
drivername - ��ݿ������jdbcurl - ��ݿ�����URLusername - ��ݿ��û���password - ��ݿ�����packagename - package���path - ��ɴ���·��connectionSize - ����ʱ��Сpublic MyPool(String databaseType, ResourceBundle rb)
databaseType - 数据库类型,可用的参数类型有 MySQL ,Oraclerb - 数据库配置参数属性文件public MyPool(String database, String configurefile)
database - the databaseconfigurefile - the configurefilepublic String getGwt_base()
public void setGwt_base(String gwt_base)
gwt_base - the new gwt basepublic static MyPool getInstance(String database)
database - the databasepublic static MyPool getInstance()
public static MyPool getInstance(String database, String configurefile)
database - the databaseconfigurefile - the configurefilepublic void log(String msg)
msg - the msgpublic void releaseConnection(Connection con)
releaseConnection 在接口中 IConnectionPoolcon - �ͻ������ͷŵ�����public Connection getConnection()
getConnection 在接口中 IConnectionPoolpublic Connection getConnection(long timeout)
timeout - �Ժ���Ƶĵȴ�ʱ������public void close()
public String getDriverName()
public void setDriverName(String driverName)
driverName - the driverName to setpublic String getJdbcURL()
public void setJdbcURL(String jdbcURL)
jdbcURL - the jdbcURL to setpublic String getPasswd()
public void setPasswd(String passwd)
passwd - the passwd to setpublic String getUsername()
public void setUsername(String username)
username - the username to setpublic int getMaxConnections()
public void setMaxConnections(int maxConnections)
maxConnections - the maxConnections to setpublic void setPackage(String pack)
pack - the new packagepublic String getNetPath()
IConnectionPoolgetNetPath 在接口中 IConnectionPoolpublic void setNetPath(String netPath)
netPath - the new net pathpublic String getPath()
IConnectionPoolgetPath 在接口中 IConnectionPoolpublic void setPath(String path)
path - the new pathpublic String getPackage()
IConnectionPoolgetPackage 在接口中 IConnectionPoolpublic String getDatabase()
public void setDatabase(String database)
database - the new databasepublic String getGwtbase()
IConnectionPoolgetGwtbase 在接口中 IConnectionPoolCopyright © 2018. All rights reserved.