public class DefaultBatch extends AbstractBatch
AbstractBatchbatch, batchListener, batchSize, batchTimeout, buffer, de, DEFAULT_RETRY_INTERVAL, dev, flushRetryDelay, lastFlush, logger, maxAwaitTimeShutdown, maxFlushRetries, name, NO_RETRY, salt, scheduler| Modifier | Constructor and Description |
|---|---|
protected |
DefaultBatch(DatabaseEngine de,
String name,
int batchSize,
long batchTimeout,
long maxAwaitTimeShutdown)
Creates a new instance of
DefaultBatch. |
protected |
DefaultBatch(DatabaseEngine de,
String name,
int batchSize,
long batchTimeout,
long maxAwaitTimeShutdown,
BatchListener listener)
Creates a new instance of
DefaultBatch. |
protected |
DefaultBatch(DatabaseEngine de,
String name,
int batchSize,
long batchTimeout,
long maxAwaitTimeShutdown,
BatchListener listener,
int maxFlushRetries,
long flushRetryDelay)
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. |
static DefaultBatch |
create(DatabaseEngine de,
String name,
int batchSize,
long batchTimeout,
long maxAwaitTimeShutdown,
BatchListener listener)
Creates a new instance of
DefaultBatch with a BatchListener. |
static DefaultBatch |
create(DatabaseEngine de,
String name,
int batchSize,
long batchTimeout,
long maxAwaitTimeShutdown,
BatchListener listener,
int maxFlushRetries,
long flushRetryDelay)
Creates a new instance of
DefaultBatch with a BatchListener. |
static DefaultBatch |
create(DatabaseEngine de,
String name,
int batchSize,
long batchTimeout,
long maxAwaitTimeShutdown,
FailureListener listener)
Deprecated.
|
static DefaultBatch |
create(DatabaseEngine de,
String name,
int batchSize,
long batchTimeout,
long maxAwaitTimeShutdown,
FailureListener listener,
int maxFlushRetries,
long flushRetryDelay)
Deprecated.
|
add, add, convertToBatchListener, destroy, flush, flush, onFlushFailure, onFlushSuccess, run, startprotected 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.protected DefaultBatch(DatabaseEngine de, String name, int batchSize, long batchTimeout, long maxAwaitTimeShutdown, BatchListener 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 or succeeds to persist at least
one data row.protected DefaultBatch(DatabaseEngine de, String name, int batchSize, long batchTimeout, long maxAwaitTimeShutdown, BatchListener 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 or succeeds 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, 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.@Deprecated public static DefaultBatch create(DatabaseEngine de, String name, int batchSize, long batchTimeout, long maxAwaitTimeShutdown, FailureListener listener)
create(DatabaseEngine, String, int, long, long, BatchListener) instead.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.@Deprecated public static DefaultBatch create(DatabaseEngine de, String name, int batchSize, long batchTimeout, long maxAwaitTimeShutdown, FailureListener listener, int maxFlushRetries, long flushRetryDelay)
create(DatabaseEngine, String, int, long, long, BatchListener, int, long) intead.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
.public static DefaultBatch create(DatabaseEngine de, String name, int batchSize, long batchTimeout, long maxAwaitTimeShutdown, BatchListener listener)
Creates a new instance of DefaultBatch with a BatchListener.
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, String name, int batchSize, long batchTimeout, long maxAwaitTimeShutdown, BatchListener listener, int maxFlushRetries, long flushRetryDelay)
Creates a new instance of DefaultBatch with a BatchListener.
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 © 2021 Feedzai. All rights reserved.