public class DefaultBatch extends AbstractBatch
Behind the scenes, it will periodically flush pending statements. It has auto recovery and will never thrown any exception.
AbstractBatch
batch, batchSize, batchTimeout, buffer, de, dev, lastFlush, logger, maxAwaitTimeShutdown, name, salt, scheduler
Modifier | Constructor and Description |
---|---|
protected |
DefaultBatch(DatabaseEngine de,
String name,
int batchSize,
long batchTimeout,
long maxAwaitTimeShutdown)
Creates a new instance of
DefaultBatch . |
Modifier and Type | Method and Description |
---|---|
static DefaultBatch |
create(DatabaseEngine de,
String name,
int batchSize,
long batchTimeout,
long maxAwaitTimeShutdown)
Creates a new instance of
DefaultBatch . |
add, add, destroy, flush, onFlushFailure, run, start
protected DefaultBatch(DatabaseEngine de, String name, int batchSize, long batchTimeout, long maxAwaitTimeShutdown)
DefaultBatch
.de
- The database engine reference.name
- The batch name.batchSize
- The batch size.batchTimeout
- The timeout.maxAwaitTimeShutdown
- The maximum await time for the batch to shutdown.public static DefaultBatch create(DatabaseEngine de, String name, int batchSize, long batchTimeout, long maxAwaitTimeShutdown)
Creates a new instance of DefaultBatch
.
Starts the timertask.
de
- The database engine.name
- The batch name.batchSize
- The batch size.batchTimeout
- The batch timeout.maxAwaitTimeShutdown
- The maximum await time for the batch to shutdown.Copyright © 2014 Feedzai. All Rights Reserved.