Interface Batch
-
- All Known Implementing Classes:
BatchImpl
@Incubating public interface Batch
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
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.void
execute()
Execute this batch.BatchKey
getKey()
Retrieves the object being used to key (uniquely identify) this batch.PreparedStatementGroup
getStatementGroup()
void
release()
Used to indicate that the batch instance is no longer needed and that, therefore, it can release its resources.
-
-
-
Method Detail
-
getKey
BatchKey getKey()
Retrieves the object being used to key (uniquely identify) this batch.- Returns:
- The batch key.
-
addObserver
void addObserver(BatchObserver observer)
Adds an observer to this batch.- Parameters:
observer
- The batch observer.
-
getStatementGroup
PreparedStatementGroup getStatementGroup()
-
addToBatch
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.
-
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.
-
-