Class BatchImpl
java.lang.Object
org.hibernate.engine.jdbc.batch.internal.BatchImpl
- All Implemented Interfaces:
Batch
Standard implementation of Batch
-
Constructor Summary
ConstructorDescriptionBatchImpl
(BatchKey key, PreparedStatementGroup statementGroup, int batchSizeToUse, JdbcCoordinator jdbcCoordinator) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
abortBatch
(Exception cause) void
addObserver
(BatchObserver observer) Adds an observer to this batch.void
addToBatch
(JdbcValueBindings jdbcValueBindings, TableInclusionChecker inclusionChecker) Apply the value bindings to the batch JDBC statements and indicates completion of the current part of the batch.protected void
clearBatch
(PreparedStatementDetails statementDetails) void
execute()
Execute this batch.final BatchKey
getKey()
Retrieves the object being used to key (uniquely identify) this batch.protected final void
Convenience method to notify registered observers of an explicit execution of this batch.protected final void
Convenience method to notify registered observers of an implicit execution of this batch.protected void
void
release()
Used to indicate that the batch instance is no longer needed and that, therefore, it can release its resources.protected void
toString()
-
Constructor Details
-
BatchImpl
public BatchImpl(BatchKey key, PreparedStatementGroup statementGroup, int batchSizeToUse, JdbcCoordinator jdbcCoordinator)
-
-
Method Details
-
getKey
Description copied from interface:Batch
Retrieves the object being used to key (uniquely identify) this batch. -
getStatementGroup
- Specified by:
getStatementGroup
in interfaceBatch
-
addObserver
Description copied from interface:Batch
Adds an observer to this batch.- Specified by:
addObserver
in interfaceBatch
- Parameters:
observer
- The batch observer.
-
addToBatch
Description copied from interface:Batch
Apply the value bindings to the batch JDBC statements and indicates completion of the current part of the batch.- Specified by:
addToBatch
in interfaceBatch
-
releaseStatements
protected void releaseStatements() -
clearBatch
-
notifyObserversExplicitExecution
protected final void notifyObserversExplicitExecution()Convenience method to notify registered observers of an explicit execution of this batch. -
notifyObserversImplicitExecution
protected final void notifyObserversImplicitExecution()Convenience method to notify registered observers of an implicit execution of this batch. -
abortBatch
-
execute
public void execute()Description copied from interface:Batch
Execute this batch. -
performExecution
protected void performExecution() -
release
public void release()Description copied from interface:Batch
Used to indicate that the batch instance is no longer needed and that, therefore, it can release its resources. -
toString
-