PB - The type of PdbBatch that the config built from this builder applies to.BC - The type of BatchConfig that this builder generates.SELF - The concrete type of AbstractBatchConfig.Builder overriding this abstract class.public abstract static class AbstractBatchConfig.Builder<PB extends PdbBatch,BC extends AbstractBatchConfig<PB,?>,SELF extends AbstractBatchConfig.Builder<PB,BC,SELF>> extends Object
AbstractBatchConfig.| Modifier and Type | Field and Description |
|---|---|
protected BatchListener |
batchListener |
protected Integer |
batchSize |
protected Duration |
batchTimeout |
protected org.slf4j.Logger |
confidentialLogger |
protected Duration |
flushRetryDelay |
protected Duration |
maxAwaitTimeShutdown |
protected Integer |
maxFlushRetries |
protected MetricsListener |
metricsListener |
protected String |
name |
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
abstract BC |
build()
Builds the config.
|
protected abstract SELF |
self()
Helper method to return the current instance, with the correct type.
|
SELF |
withBatchListener(BatchListener batchListener)
Sets the batch listener.
|
SELF |
withBatchSize(int batchSize)
Sets the batch size.
|
SELF |
withBatchTimeout(Duration batchTimeout)
Sets the batch timeout.
|
SELF |
withConfidentialLogger(org.slf4j.Logger confidentialLogger)
Sets the confidential logger.
|
SELF |
withFlushRetryDelay(Duration flushRetryDelay)
Sets the flush retry delay.
|
SELF |
withMaxAwaitTimeShutdown(Duration maxAwaitTimeShutdown)
Sets the maximum time to wait for shutdown.
|
SELF |
withMaxFlushRetries(int maxFlushRetries)
Sets the maximum number of flush retries.
|
SELF |
withMetricsListener(MetricsListener metricsListener)
Sets the metrics listener.
|
SELF |
withName(String name)
Sets a name for the batch.
|
protected String name
AbstractBatchConfig.getName()protected Integer batchSize
AbstractBatchConfig.getBatchSize()protected Duration batchTimeout
AbstractBatchConfig.getBatchTimeout()protected Duration maxAwaitTimeShutdown
protected Integer maxFlushRetries
AbstractBatchConfig.getMaxFlushRetries()protected Duration flushRetryDelay
AbstractBatchConfig.getFlushRetryDelay()protected BatchListener batchListener
AbstractBatchConfig.getBatchListener()protected MetricsListener metricsListener
AbstractBatchConfig.getMetricsListener()protected org.slf4j.Logger confidentialLogger
public final SELF withName(@Nullable String name)
name - The name.AbstractBatchConfig.getName()public final SELF withBatchSize(int batchSize)
batchSize - The batch size.AbstractBatchConfig.getBatchSize()public final SELF withBatchTimeout(Duration batchTimeout)
batchTimeout - The batch timeout.AbstractBatchConfig.getBatchTimeout()public final SELF withMaxAwaitTimeShutdown(Duration maxAwaitTimeShutdown)
maxAwaitTimeShutdown - The maximum time to wait for shutdown.AbstractBatchConfig.getMaxAwaitTimeShutdown()public final SELF withMaxFlushRetries(int maxFlushRetries)
maxFlushRetries - The maximum flush retries.AbstractBatchConfig.getMaxFlushRetries()public final SELF withFlushRetryDelay(Duration flushRetryDelay)
flushRetryDelay - The flush retry delay.AbstractBatchConfig.getFlushRetryDelay()public final SELF withBatchListener(BatchListener batchListener)
batchListener - The batch listener.AbstractBatchConfig.getBatchListener()public final SELF withMetricsListener(MetricsListener metricsListener)
metricsListener - The metrics listener.AbstractBatchConfig.getMetricsListener()public final SELF withConfidentialLogger(org.slf4j.Logger confidentialLogger)
confidentialLogger - The confidential logger.AbstractBatchConfig.getConfidentialLogger()protected abstract SELF self()
public abstract BC build()
Copyright © 2023 Feedzai. All rights reserved.