类 AbstractBatchImpl
- java.lang.Object
-
- org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl
-
- 所有已实现的接口:
Batch
- 直接已知子类:
BatchingBatch,NonBatchingBatch
public abstract class AbstractBatchImpl extends Object implements Batch
Convenience base class for implementers of the Batch interface.- 作者:
- Steve Ebersole, Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
-
-
构造器概要
构造器 限定符 构造器 说明 protectedAbstractBatchImpl(BatchKey key, JdbcCoordinator jdbcCoordinator)
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected voidabortBatch()voidaddObserver(BatchObserver observer)Adds an observer to this batch.protected voidclearBatch(PreparedStatement statement)protected abstract voiddoExecuteBatch()Perform batch execution..voidexecute()Execute this batch.PreparedStatementgetBatchStatement(String sql, boolean callable)Get a statement which is part of the batch, creating if necessary (and storing for next time).protected JdbcCoordinatorgetJdbcCoordinator()BatchKeygetKey()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 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.voidrelease()Used to indicate that the batch instance is no longer needed and that, therefore, it can release its resources.protected voidreleaseStatements()protected SqlExceptionHelpersqlExceptionHelper()Convenience access to the SQLException helper.protected SqlStatementLoggersqlStatementLogger()Convenience access to the SQL statement logger.-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.hibernate.engine.jdbc.batch.spi.Batch
addToBatch
-
-
-
-
构造器详细资料
-
AbstractBatchImpl
protected AbstractBatchImpl(BatchKey key, JdbcCoordinator jdbcCoordinator)
-
-
方法详细资料
-
getJdbcCoordinator
protected JdbcCoordinator getJdbcCoordinator()
-
doExecuteBatch
protected abstract void doExecuteBatch()
Perform batch execution.. This is called from the explicitexecution, but may also be called from elsewhere depending on the exact implementation.
-
sqlExceptionHelper
protected SqlExceptionHelper sqlExceptionHelper()
Convenience access to the SQLException helper.- 返回:
- The underlying SQLException helper.
-
sqlStatementLogger
protected SqlStatementLogger sqlStatementLogger()
Convenience access to the SQL statement logger.- 返回:
- The underlying JDBC services.
-
abortBatch
protected void abortBatch()
-
getStatements
protected LinkedHashMap<String,PreparedStatement> getStatements()
Access to the batch's map of statements (keyed by SQL statement string).- 返回:
- This batch's statements.
-
getKey
public final BatchKey getKey()
从接口复制的说明:BatchRetrieves the object being used to key (uniquely identify) this batch.
-
addObserver
public void addObserver(BatchObserver observer)
从接口复制的说明:BatchAdds an observer to this batch.- 指定者:
addObserver在接口中Batch- 参数:
observer- The batch observer.
-
getBatchStatement
public PreparedStatement getBatchStatement(String sql, boolean callable)
从接口复制的说明:BatchGet a statement which is part of the batch, creating if necessary (and storing for next time).- 指定者:
getBatchStatement在接口中Batch- 参数:
sql- The SQL statement.callable- Is the SQL statement callable?- 返回:
- The prepared statement instance, representing the SQL statement.
-
releaseStatements
protected void releaseStatements()
-
clearBatch
protected void clearBatch(PreparedStatement statement)
-
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.
-
-