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) |
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, transactionContext
public BatchingBatch(BatchKey key, JdbcCoordinator jdbcCoordinator, int batchSize)
public PreparedStatement getBatchStatement(String sql, boolean callable)
Batch
getBatchStatement
in interface Batch
getBatchStatement
in class AbstractBatchImpl
sql
- The SQL statement.callable
- Is the SQL statement callable?public void addToBatch()
Batch
protected void doExecuteBatch()
AbstractBatchImpl
execution
, but may also be called from elsewhere
depending on the exact implementation.doExecuteBatch
in class AbstractBatchImpl
Copyright © 2018 JBoss by Red Hat. All rights reserved.