C - The type of PdbBatch that this config class applies to.public interface BatchConfig<C extends PdbBatch>
PdbBatch.| Modifier and Type | Method and Description |
|---|---|
Class<C> |
getBatchClass()
Gets the concrete class of the
PdbBatch implementation that this config belongs to. |
BatchListener |
getBatchListener()
The listener that will be invoked whenever some batch operation fail or succeeds to persist.
|
int |
getBatchSize()
Gets the size of the batch; when the number of pending entries reaches this number, the batch should flush.
|
Duration |
getBatchTimeout()
Gets the batch timeout.
|
Optional<org.slf4j.Logger> |
getConfidentialLogger()
Gets an optional logger to log messages potentially containing sensitive data.
|
Duration |
getFlushRetryDelay()
Gets the time interval to wait between batch flush retries.
|
Duration |
getMaxAwaitTimeShutdown()
Gets the maximum time to wait for the batch to shutdown.
|
int |
getMaxFlushRetries()
Gets the number of times to retry a batch flush upon failure.
|
MetricsListener |
getMetricsListener()
The listener that will be invoked whenever some measurable event occurs, so that it can be captured and reported
in monitoring metrics.
|
String |
getName()
Gets the name to use for the batch.
|
@Nonnull Class<C> getBatchClass()
PdbBatch implementation that this config belongs to.int getBatchSize()
@Nonnull Duration getBatchTimeout()
Each time there aren't enough pending entries as specified in the getBatchSize() to trigger a flush,
then a flush should be triggered by timeout, when the time specified by this setting has elapsed since the last
flush.
@Nullable Duration getMaxAwaitTimeShutdown()
null, in which case the batch implementation should use the value specified in the
PDB property PdbProperties.MAXIMUM_TIME_BATCH_SHUTDOWN.int getMaxFlushRetries()
@Nonnull Duration getFlushRetryDelay()
@Nonnull BatchListener getBatchListener()
BatchListener.@Nonnull MetricsListener getMetricsListener()
MetricsListener.Copyright © 2023 Feedzai. All rights reserved.