Class BatchImpl
java.lang.Object
org.hibernate.engine.jdbc.batch.internal.BatchImpl
- All Implemented Interfaces:
Batch
Standard implementation of Batch
- Author:
- Steve Ebersole
-
Constructor Summary
ConstructorsConstructorDescriptionBatchImpl(BatchKey key, PreparedStatementGroup statementGroup, int batchSizeToUse, JdbcCoordinator jdbcCoordinator) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidabortBatch(Exception cause) voidaddObserver(BatchObserver observer) Adds an observer to this batch.voidaddToBatch(JdbcValueBindings jdbcValueBindings, TableInclusionChecker inclusionChecker) Apply the value bindings to the batch JDBC statements and indicates completion of the current part of the batch.protected voidclearBatch(PreparedStatementDetails statementDetails) voidexecute()Execute this batch.final BatchKeygetKey()Retrieves the object being used to key (uniquely identify) this batch.protected final voidConvenience method to notify registered observers of an explicit execution of this batch.protected final voidConvenience method to notify registered observers of an implicit execution of this batch.protected voidvoidrelease()Used to indicate that the batch instance is no longer needed and that, therefore, it can release its resources.protected voidtoString()
-
Constructor Details
-
BatchImpl
public BatchImpl(BatchKey key, PreparedStatementGroup statementGroup, int batchSizeToUse, JdbcCoordinator jdbcCoordinator)
-
-
Method Details
-
getKey
Description copied from interface:BatchRetrieves the object being used to key (uniquely identify) this batch. -
getStatementGroup
- Specified by:
getStatementGroupin interfaceBatch
-
addObserver
Description copied from interface:BatchAdds an observer to this batch.- Specified by:
addObserverin interfaceBatch- Parameters:
observer- The batch observer.
-
addToBatch
Description copied from interface:BatchApply the value bindings to the batch JDBC statements and indicates completion of the current part of the batch.- Specified by:
addToBatchin 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:BatchExecute this batch. -
performExecution
protected void performExecution() -
release
public void release()Description copied from interface:BatchUsed to indicate that the batch instance is no longer needed and that, therefore, it can release its resources. -
toString
-