Interface Batch
- All Known Implementing Classes:
BatchImpl
Represents a batch of statements to be executed together.
Unlike in JDBC, here we add the ability to batch together multiple statements at a time.
In the underlying JDBC this correlates to multiple PreparedStatement
objects,
one for each DML string, all maintained within the batch.
A batch is usually associated with a JdbcCoordinator
.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.void
addToBatch
(JdbcValueBindings jdbcValueBindings, TableInclusionChecker inclusionChecker, Batch.StaleStateMapper staleStateMapper) Apply the value bindings to the batch JDBC statements and indicates completion of the current part of the batch.void
execute()
Execute this batch.getKey()
Retrieves the object being used to key (uniquely identify) this batch.void
release()
Used to indicate that the batch instance is no longer needed and that, therefore, it can release its resources.
-
Method Details
-
getKey
BatchKey getKey()Retrieves the object being used to key (uniquely identify) this batch.- Returns:
- The batch key.
-
addObserver
Adds an observer to this batch.- Parameters:
observer
- The batch observer.
-
getStatementGroup
PreparedStatementGroup getStatementGroup() -
addToBatch
Apply the value bindings to the batch JDBC statements and indicates completion of the current part of the batch. -
addToBatch
void addToBatch(JdbcValueBindings jdbcValueBindings, TableInclusionChecker inclusionChecker, Batch.StaleStateMapper staleStateMapper) Apply the value bindings to the batch JDBC statements and indicates completion of the current part of the batch. -
execute
void execute()Execute this batch. -
release
void release()Used to indicate that the batch instance is no longer needed and that, therefore, it can release its resources.
-