public class DefaultBatch extends AbstractBatch
AbstractBatchbatch, batchSize, batchTimeout, buffer, de, DEFAULT_RETRY_INTERVAL, dev, failureListener, flushRetryDelay, lastFlush, logger, maxAwaitTimeShutdown, maxFlushRetries, name, NO_OP, NO_RETRY, salt, scheduler| Modifier | Constructor and Description |
|---|---|
protected |
DefaultBatch(DatabaseEngine de,
java.lang.String name,
int batchSize,
long batchTimeout,
long maxAwaitTimeShutdown)
Creates a new instance of
DefaultBatch. |
protected |
DefaultBatch(DatabaseEngine de,
java.lang.String name,
int batchSize,
long batchTimeout,
long maxAwaitTimeShutdown,
FailureListener listener)
Creates a new instance of
DefaultBatch. |
protected |
DefaultBatch(DatabaseEngine de,
java.lang.String name,
int batchSize,
long batchTimeout,
long maxAwaitTimeShutdown,
FailureListener listener,
int maxFlushRetries,
long flushRetryDelay)
Creates a new instance of
DefaultBatch. |
| Modifier and Type | Method and Description |
|---|---|
static DefaultBatch |
create(DatabaseEngine de,
java.lang.String name,
int batchSize,
long batchTimeout,
long maxAwaitTimeShutdown)
Creates a new instance of
DefaultBatch. |
static DefaultBatch |
create(DatabaseEngine de,
java.lang.String name,
int batchSize,
long batchTimeout,
long maxAwaitTimeShutdown,
FailureListener listener)
Creates a new instance of
DefaultBatch with a FailureListener. |
static DefaultBatch |
create(DatabaseEngine de,
java.lang.String name,
int batchSize,
long batchTimeout,
long maxAwaitTimeShutdown,
FailureListener listener,
int maxFlushRetries,
long flushRetryDelay)
Creates a new instance of
DefaultBatch with a FailureListener. |
add, add, destroy, flush, flush, onFlushFailure, run, startprotected DefaultBatch(DatabaseEngine de, java.lang.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.protected DefaultBatch(DatabaseEngine de, java.lang.String name, int batchSize, long batchTimeout, long maxAwaitTimeShutdown, FailureListener listener)
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.listener - The listener that will be invoked when batch fails to persist at least one data row.protected DefaultBatch(DatabaseEngine de, java.lang.String name, int batchSize, long batchTimeout, long maxAwaitTimeShutdown, FailureListener listener, int maxFlushRetries, long flushRetryDelay)
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.listener - The listener that will be invoked when batch fails to persist at least one data row.maxFlushRetries - The number of times to retry a batch flush upon failure. Defaults to
. When set to 0, no retries will be attempted.flushRetryDelay - The time interval (milliseconds) to wait between batch flush retries. Defaults to
.public static DefaultBatch create(DatabaseEngine de, java.lang.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.public static DefaultBatch create(DatabaseEngine de, java.lang.String name, int batchSize, long batchTimeout, long maxAwaitTimeShutdown, FailureListener listener)
Creates a new instance of DefaultBatch with a FailureListener.
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.listener - The listener that will be invoked when batch fails to persist at least one data row.public static DefaultBatch create(DatabaseEngine de, java.lang.String name, int batchSize, long batchTimeout, long maxAwaitTimeShutdown, FailureListener listener, int maxFlushRetries, long flushRetryDelay)
Creates a new instance of DefaultBatch with a FailureListener.
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.listener - The listener that will be invoked when batch fails to persist at least one data row.maxFlushRetries - The number of times to retry a batch flush upon failure. Defaults to
. When set to 0, no retries will be attempted.flushRetryDelay - The time interval (milliseconds) to wait between batch flush retries. Defaults to
.Copyright © 2020 Feedzai. All Rights Reserved.