public JDBCExecuteEngine(final BackendConnection backendConnection, final JDBCExecutorWrapper jdbcExecutorWrapper) { this.backendConnection = backendConnection; this.jdbcExecutorWrapper = jdbcExecutorWrapper; int maxConnectionsSizePerQuery = GlobalRegistry.getInstance().getShardingProperties().<Integer>getValue(ShardingPropertiesConstant.MAX_CONNECTIONS_SIZE_PER_QUERY); ShardingExecuteEngine executeEngine = BackendExecutorContext.getInstance().getExecuteEngine(); sqlExecutePrepareTemplate = new SQLExecutePrepareTemplate(maxConnectionsSizePerQuery); sqlExecuteTemplate = new SQLExecuteTemplate(executeEngine, backendConnection.isSerialExecute()); }
public JDBCExecuteEngine(final BackendConnection backendConnection, final JDBCExecutorWrapper jdbcExecutorWrapper) { this.backendConnection = backendConnection; this.jdbcExecutorWrapper = jdbcExecutorWrapper; int maxConnectionsSizePerQuery = GlobalRegistry.getInstance().getShardingProperties().<Integer>getValue(ShardingPropertiesConstant.MAX_CONNECTIONS_SIZE_PER_QUERY); ShardingExecuteEngine executeEngine = BackendExecutorContext.getInstance().getExecuteEngine(); sqlExecutePrepareTemplate = new SQLExecutePrepareTemplate(maxConnectionsSizePerQuery); sqlExecuteTemplate = new SQLExecuteTemplate(executeEngine, backendConnection.isSerialExecute()); }
public AbstractStatementExecutor(final int resultSetType, final int resultSetConcurrency, final int resultSetHoldability, final ShardingConnection shardingConnection) { this.databaseType = shardingConnection.getShardingContext().getDatabaseType(); this.resultSetType = resultSetType; this.resultSetConcurrency = resultSetConcurrency; this.resultSetHoldability = resultSetHoldability; this.connection = shardingConnection; int maxConnectionsSizePerQuery = connection.getShardingContext().getShardingProperties().<Integer>getValue(ShardingPropertiesConstant.MAX_CONNECTIONS_SIZE_PER_QUERY); ShardingExecuteEngine executeEngine = connection.getShardingContext().getExecuteEngine(); sqlExecutePrepareTemplate = new SQLExecutePrepareTemplate(maxConnectionsSizePerQuery); sqlExecuteTemplate = new SQLExecuteTemplate(executeEngine, connection.isSerialExecute()); }