|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openanzo.jdbc.utils.batchable.BatchExecuter
public class BatchExecuter
Commits a List of batchable rdb statements (DDL, inserts, updates and deletes) to the database using optimal jdbc prepared statement batching. This is useful in situations where a application is building up a bunch of changes to database tables and may contain multiple calls to individual prepared statements. This executer will sort the prepared statement calls and execute calls to the same prepared statement together in a batch.
Batchable| Nested Class Summary | |
|---|---|
static interface |
BatchExecuter.BatchHandler
Methods that get run before and after the executor executes the batchables |
| Constructor Summary | |
|---|---|
BatchExecuter()
|
|
| Method Summary | |
|---|---|
static void |
execute(PreparedStatementCache cache,
Batchable.BatchOperation op)
Execute a single BatchOperation |
static void |
execute(PreparedStatementCache cache,
Batchable batchItem)
Execute a single Batchable. |
static void |
execute(PreparedStatementCache cache,
BatchOperationQueue boq)
Execute the contents of a BatchOperationQueue |
static boolean |
execute(PreparedStatementCache cache,
BatchOperationQueue boq,
BatchExecuter.BatchHandler handler)
Execute the contents of a BatchOperationQueue |
static void |
executeUnsorted(PreparedStatementCache cache,
Batchable batchItem)
Execute a single Batchable, without first sorting and merging any operations with the Batchable. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BatchExecuter()
| Method Detail |
|---|
public static void execute(PreparedStatementCache cache,
Batchable.BatchOperation op)
throws java.sql.SQLException
cache - source of preparedStatementsop - operation to execute
java.sql.SQLException - if there was an error executing the operation
public static void execute(PreparedStatementCache cache,
Batchable batchItem)
throws RdbException
cache - source of preparedStatementsbatchItem - Batchable to execute
RdbException - if there was an error executing the operation
public static void executeUnsorted(PreparedStatementCache cache,
Batchable batchItem)
throws RdbException
cache - source of preparedStatementsbatchItem - Batchable to execute
RdbException - if there was an error executing the operation
public static void execute(PreparedStatementCache cache,
BatchOperationQueue boq)
throws java.sql.SQLException
cache - source of preparedStatementsboq - BatchOperationQueue to execute
java.sql.SQLException - if there was an exception executing queue
public static boolean execute(PreparedStatementCache cache,
BatchOperationQueue boq,
BatchExecuter.BatchHandler handler)
throws java.sql.SQLException
cache - source of preparedStatementsboq - BatchOperationQueue to executehandler - Callback handler that is called before and after executing the queue
java.sql.SQLException - if there was an exception executing queue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||