public class BatchingBatch extends AbstractBatchImpl
Batch implementation which does bathing based on a given size. Once
the batch size is reached for a statement in the batch, the entire batch is implicitly executed.| Constructor and Description |
|---|
BatchingBatch(BatchKey key,
JdbcCoordinator jdbcCoordinator,
int batchSize)
Constructs a BatchingBatch
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToBatch()
Indicates completion of the current part of the batch.
|
protected void |
doExecuteBatch()
Perform batch execution.
|
PreparedStatement |
getBatchStatement(String sql,
boolean callable)
Get a statement which is part of the batch, creating if necessary (and storing for next time).
|
abortBatch, addObserver, clearBatch, execute, getKey, getStatements, notifyObserversExplicitExecution, notifyObserversImplicitExecution, release, releaseStatements, sqlExceptionHelper, sqlStatementLogger, transactionContextpublic BatchingBatch(BatchKey key, JdbcCoordinator jdbcCoordinator, int batchSize)
key - The batch keyjdbcCoordinator - The JDBC jdbcCoordinatorbatchSize - The batch size.public PreparedStatement getBatchStatement(String sql, boolean callable)
BatchgetBatchStatement in interface BatchgetBatchStatement in class AbstractBatchImplsql - The SQL statement.callable - Is the SQL statement callable?public void addToBatch()
Batchprotected void doExecuteBatch()
AbstractBatchImplexecution, but may also be called from elsewhere
depending on the exact implementation.doExecuteBatch in class AbstractBatchImplCopyright © 2001-2015 Red Hat, Inc. All Rights Reserved.