Class BatchImpl
- java.lang.Object
- org.hibernate.engine.jdbc.batch.internal.BatchImpl
Constructor Summary
Constructors Constructor Description BatchImpl(BatchKey key,PreparedStatementGroup statementGroup, int batchSizeToUse,JdbcCoordinator jdbcCoordinator)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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.BatchKeygetKey()Retrieves the object being used to key (uniquely identify) this batch.PreparedStatementGroupgetStatementGroup()protected voidnotifyObserversExplicitExecution()Convenience method to notify registered observers of an explicit execution of this batch.protected voidnotifyObserversImplicitExecution()Convenience method to notify registered observers of an implicit execution of this batch.protected voidperformExecution()voidrelease()Used to indicate that the batch instance is no longer needed and that, therefore, it can release its resources.protected voidreleaseStatements()StringtoString()
Constructor Detail
BatchImpl
public BatchImpl(BatchKey key,PreparedStatementGroup statementGroup, int batchSizeToUse,JdbcCoordinator jdbcCoordinator)
Method Detail
getKey
public final BatchKey getKey()
Description copied from interface:BatchRetrieves the object being used to key (uniquely identify) this batch.
getStatementGroup
public PreparedStatementGroup getStatementGroup()
- Specified by:
getStatementGroupin interfaceBatch
addObserver
public void addObserver(BatchObserver observer)
Description copied from interface:BatchAdds an observer to this batch.- Specified by:
addObserverin interfaceBatch- Parameters:
observer- The batch observer.
addToBatch
public void addToBatch(JdbcValueBindings jdbcValueBindings,TableInclusionChecker inclusionChecker)
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
protected void clearBatch(PreparedStatementDetails statementDetails)
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
protected void abortBatch(Exception cause)
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.