@ -27,7 +27,7 @@ import java.util.Timer;
import java.util.TimerTask ;
import com.zaxxer.hikari.HikariPool ;
import com.zaxxer.hikari.util.Fast List;
import com.zaxxer.hikari.util.Fast Statement List;
/ * *
* This is the proxy class for java . sql . Connection .
@ -36,13 +36,11 @@ import com.zaxxer.hikari.util.FastList;
* /
public abstract class ConnectionProxy implements IHikariConnectionProxy
{
private static final ProxyFactory PROXY_FACTORY ;
private static final Set < String > SQL_ERRORS ;
protected final Connection delegate ;
private final Fast List< Statement > openStatements ;
private final Fast StatementList openStatements ;
private final HikariPool parentPool ;
private boolean isClosed ;
@ -63,8 +61,6 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
SQL_ERRORS . add ( "57P03" ) ; // CANNOT CONNECT NOW
SQL_ERRORS . add ( "57P02" ) ; // CRASH SHUTDOWN
SQL_ERRORS . add ( "01002" ) ; // SQL92 disconnect error
PROXY_FACTORY = JavassistProxyFactoryFactory . getProxyFactory ( ) ;
}
protected ConnectionProxy ( HikariPool pool , Connection connection )
@ -73,7 +69,7 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
this . delegate = connection ;
creationTime = lastAccess = System . currentTimeMillis ( ) ;
openStatements = new Fast List< Statement > ( ) ;
openStatements = new Fast StatementList ( ) ;
}
public final void unregisterStatement ( Object statement )
@ -409,61 +405,61 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy
private final Statement __createStatement ( ) throws SQLException
{
return P ROXY_FACTORY . getProxyStatement ( this , delegate . createStatement ( ) ) ;
return P roxyFactory . getProxyStatement ( this , delegate . createStatement ( ) ) ;
}
private final Statement __createStatement ( int resultSetType , int resultSetConcurrency ) throws SQLException
{
return P ROXY_FACTORY . getProxyStatement ( this , delegate . createStatement ( resultSetType , resultSetConcurrency ) ) ;
return P roxyFactory . getProxyStatement ( this , delegate . createStatement ( resultSetType , resultSetConcurrency ) ) ;
}
private final Statement __createStatement ( int resultSetType , int resultSetConcurrency , int resultSetHoldability ) throws SQLException
{
return P ROXY_FACTORY . getProxyStatement ( this , delegate . createStatement ( resultSetType , resultSetConcurrency , resultSetHoldability ) ) ;
return P roxyFactory . getProxyStatement ( this , delegate . createStatement ( resultSetType , resultSetConcurrency , resultSetHoldability ) ) ;
}
private final CallableStatement __prepareCall ( String sql ) throws SQLException
{
return P ROXY_FACTORY . getProxyCallableStatement ( this , delegate . prepareCall ( sql ) ) ;
return P roxyFactory . getProxyCallableStatement ( this , delegate . prepareCall ( sql ) ) ;
}
private final CallableStatement __prepareCall ( String sql , int resultSetType , int resultSetConcurrency ) throws SQLException
{
return P ROXY_FACTORY . getProxyCallableStatement ( this , delegate . prepareCall ( sql , resultSetType , resultSetConcurrency ) ) ;
return P roxyFactory . getProxyCallableStatement ( this , delegate . prepareCall ( sql , resultSetType , resultSetConcurrency ) ) ;
}
private final CallableStatement __prepareCall ( String sql , int resultSetType , int resultSetConcurrency , int resultSetHoldability ) throws SQLException
{
return P ROXY_FACTORY . getProxyCallableStatement ( this , delegate . prepareCall ( sql , resultSetType , resultSetConcurrency , resultSetHoldability ) ) ;
return P roxyFactory . getProxyCallableStatement ( this , delegate . prepareCall ( sql , resultSetType , resultSetConcurrency , resultSetHoldability ) ) ;
}
private final PreparedStatement __prepareStatement ( String sql ) throws SQLException
{
return P ROXY_FACTORY . getProxyPreparedStatement ( this , delegate . prepareStatement ( sql ) ) ;
return P roxyFactory . getProxyPreparedStatement ( this , delegate . prepareStatement ( sql ) ) ;
}
private final PreparedStatement __prepareStatement ( String sql , int autoGeneratedKeys ) throws SQLException
{
return P ROXY_FACTORY . getProxyPreparedStatement ( this , delegate . prepareStatement ( sql , autoGeneratedKeys ) ) ;
return P roxyFactory . getProxyPreparedStatement ( this , delegate . prepareStatement ( sql , autoGeneratedKeys ) ) ;
}
private final PreparedStatement __prepareStatement ( String sql , int resultSetType , int resultSetConcurrency ) throws SQLException
{
return P ROXY_FACTORY . getProxyPreparedStatement ( this , delegate . prepareStatement ( sql , resultSetType , resultSetConcurrency ) ) ;
return P roxyFactory . getProxyPreparedStatement ( this , delegate . prepareStatement ( sql , resultSetType , resultSetConcurrency ) ) ;
}
private final PreparedStatement __prepareStatement ( String sql , int resultSetType , int resultSetConcurrency , int resultSetHoldability ) throws SQLException
{
return P ROXY_FACTORY . getProxyPreparedStatement ( this , delegate . prepareStatement ( sql , resultSetType , resultSetConcurrency , resultSetHoldability ) ) ;
return P roxyFactory . getProxyPreparedStatement ( this , delegate . prepareStatement ( sql , resultSetType , resultSetConcurrency , resultSetHoldability ) ) ;
}
private final PreparedStatement __prepareStatement ( String sql , int [ ] columnIndexes ) throws SQLException
{
return P ROXY_FACTORY . getProxyPreparedStatement ( this , delegate . prepareStatement ( sql , columnIndexes ) ) ;
return P roxyFactory . getProxyPreparedStatement ( this , delegate . prepareStatement ( sql , columnIndexes ) ) ;
}
private final PreparedStatement __prepareStatement ( String sql , String [ ] columnNames ) throws SQLException
{
return P ROXY_FACTORY . getProxyPreparedStatement ( this , delegate . prepareStatement ( sql , columnNames ) ) ;
return P roxyFactory . getProxyPreparedStatement ( this , delegate . prepareStatement ( sql , columnNames ) ) ;
}
}