public abstract class AbstractBatchImpl extends Object implements Batch
Modifier | Constructor and Description |
---|---|
protected |
AbstractBatchImpl(BatchKey key,
JdbcCoordinator jdbcCoordinator) |
Modifier and Type | Method and Description |
---|---|
protected void |
abortBatch() |
void |
addObserver(BatchObserver observer)
Adds an observer to this batch.
|
protected void |
clearBatch(PreparedStatement statement) |
protected abstract void |
doExecuteBatch()
Perform batch execution..
|
void |
execute()
Execute this batch.
|
PreparedStatement |
getBatchStatement(String sql,
boolean callable)
Get a statement which is part of the batch, creating if necessary (and storing for next time).
|
protected JdbcCoordinator |
getJdbcCoordinator() |
BatchKey |
getKey()
Retrieves the object being used to key (uniquely identify) this batch.
|
protected LinkedHashMap<String,PreparedStatement> |
getStatements()
Access to the batch's map of statements (keyed by SQL statement string).
|
protected void |
notifyObserversExplicitExecution()
Convenience method to notify registered observers of an explicit execution of this batch.
|
protected void |
notifyObserversImplicitExecution()
Convenience method to notify registered observers of an implicit execution of this batch.
|
void |
release()
Used to indicate that the batch instance is no longer needed and that, therefore, it can release its
resources.
|
protected void |
releaseStatements() |
protected SqlExceptionHelper |
sqlExceptionHelper()
Convenience access to the SQLException helper.
|
protected SqlStatementLogger |
sqlStatementLogger()
Convenience access to the SQL statement logger.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addToBatch
protected AbstractBatchImpl(BatchKey key, JdbcCoordinator jdbcCoordinator)
protected JdbcCoordinator getJdbcCoordinator()
protected abstract void doExecuteBatch()
execution
, but may also be called from elsewhere
depending on the exact implementation.protected SqlExceptionHelper sqlExceptionHelper()
protected SqlStatementLogger sqlStatementLogger()
protected void abortBatch()
protected LinkedHashMap<String,PreparedStatement> getStatements()
public final BatchKey getKey()
Batch
public void addObserver(BatchObserver observer)
Batch
addObserver
in interface Batch
observer
- The batch observer.public PreparedStatement getBatchStatement(String sql, boolean callable)
Batch
getBatchStatement
in interface Batch
sql
- The SQL statement.callable
- Is the SQL statement callable?public final void execute()
Batch
protected void releaseStatements()
protected void clearBatch(PreparedStatement statement)
protected final void notifyObserversExplicitExecution()
protected final void notifyObserversImplicitExecution()
Copyright © 2019 JBoss by Red Hat. All rights reserved.