com.alibaba.druid.proxy
Class DruidDriver
java.lang.Object
com.alibaba.druid.proxy.DruidDriver
- All Implemented Interfaces:
- DruidDriverMBean, Driver
public class DruidDriver
- extends Object
- implements Driver, DruidDriverMBean
- Author:
- wenshao
DEFAULT_PREFIX
public static final String DEFAULT_PREFIX
- See Also:
- Constant Field Values
DRIVER_PREFIX
public static final String DRIVER_PREFIX
- See Also:
- Constant Field Values
PASSWORD_CALLBACK_PREFIX
public static final String PASSWORD_CALLBACK_PREFIX
- See Also:
- Constant Field Values
NAME_PREFIX
public static final String NAME_PREFIX
- See Also:
- Constant Field Values
JMX_PREFIX
public static final String JMX_PREFIX
- See Also:
- Constant Field Values
FILTERS_PREFIX
public static final String FILTERS_PREFIX
- See Also:
- Constant Field Values
DruidDriver
public DruidDriver()
registerDriver
public static boolean registerDriver(Driver driver)
getInstance
public static DruidDriver getInstance()
createDataSourceId
public static int createDataSourceId()
createSqlStatId
public static int createSqlStatId()
acceptsURL
public boolean acceptsURL(String url)
throws SQLException
- Specified by:
acceptsURL in interface Driver
- Throws:
SQLException
connect
public Connection connect(String url,
Properties info)
throws SQLException
- Specified by:
connect in interface Driver
- Throws:
SQLException
parseConfig
public static DataSourceProxyConfig parseConfig(String url,
Properties info)
throws SQLException
- Throws:
SQLException
createDriver
public Driver createDriver(String className)
throws SQLException
- Throws:
SQLException
getMajorVersion
public int getMajorVersion()
- Specified by:
getMajorVersion in interface DruidDriverMBean- Specified by:
getMajorVersion in interface Driver
getMinorVersion
public int getMinorVersion()
- Specified by:
getMinorVersion in interface DruidDriverMBean- Specified by:
getMinorVersion in interface Driver
getPropertyInfo
public DriverPropertyInfo[] getPropertyInfo(String url,
Properties info)
throws SQLException
- Specified by:
getPropertyInfo in interface Driver
- Throws:
SQLException
jdbcCompliant
public boolean jdbcCompliant()
- Specified by:
jdbcCompliant in interface DruidDriverMBean- Specified by:
jdbcCompliant in interface Driver
getConnectCount
public long getConnectCount()
- Specified by:
getConnectCount in interface DruidDriverMBean
getAcceptPrefix
public String getAcceptPrefix()
- Specified by:
getAcceptPrefix in interface DruidDriverMBean
getDataSourceUrls
public String[] getDataSourceUrls()
- Specified by:
getDataSourceUrls in interface DruidDriverMBean
getProxyDataSources
public static ConcurrentMap<String,DataSourceProxyImpl> getProxyDataSources()
getParentLogger
public Logger getParentLogger()
throws SQLFeatureNotSupportedException
- Throws:
SQLFeatureNotSupportedException
resetStat
public void resetStat()
- Specified by:
resetStat in interface DruidDriverMBean
getDruidVersion
public String getDruidVersion()
- Specified by:
getDruidVersion in interface DruidDriverMBean
Copyright © 2012 Alibaba Group. All Rights Reserved.