public static final class BatchControl.Builder
extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BATCH_LIMIT_PROPERTY
Specifies the maximum number of messages in a transaction.
|
static String |
BATCH_TIMEOUT_PROPERTY
The maximum elapsed time to complete the batch when at least one message
has been received in the current transaction.
|
static String |
BATCH_WAIT_PROPERTY
The maximum elapsed time to wait for an additional message when at least
one has been received in the current transaction.
|
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
BatchControl.Builder |
applyProperties(KeyedGroups moduleProperties)
Applies properties.
|
BatchControl |
build()
Builds a batch control.
|
BatchControl.Builder |
setDefaultLimit(int defaultLimit)
Sets the default limit.
|
BatchControl.Builder |
setDefaultWait(Optional<ElapsedTime> defaultWait)
Sets the default wait.
|
BatchControl.Builder |
setLogger(Logger logger)
Sets the logger.
|
public static final String BATCH_LIMIT_PROPERTY
public static final String BATCH_TIMEOUT_PROPERTY
public static final String BATCH_WAIT_PROPERTY
@Nonnull public BatchControl.Builder applyProperties(@Nonnull KeyedGroups moduleProperties)
moduleProperties
- The module properties.public BatchControl build()
@Nonnull public BatchControl.Builder setDefaultLimit(int defaultLimit)
defaultLimit
- The default limit.@Nonnull public BatchControl.Builder setDefaultWait(@Nonnull Optional<ElapsedTime> defaultWait)
defaultWait
- The default wait.@Nonnull public BatchControl.Builder setLogger(@Nonnull Logger logger)
logger
- The logger.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.