public static class BulkOperator.Builder extends Object
BulkOperator to provide finer control over
validation and mutability.
As a bulk operator is talking directly to a datasource, it makes sense to have to be explicit when changing state on the operator.
| Modifier and Type | Method and Description |
|---|---|
BulkOperator |
build()
Constructs a new
BulkOperator from this builder. |
BulkOperator.Builder |
concurrency(int concurrency)
Modifies the concurrency associated with this builder.
|
BulkOperator.Builder |
interval(long interval)
Modifies the interval associated with this builder.
|
BulkOperator.Builder |
lifecycle(BulkLifecycle lifecycle)
Modifies the lifecycle associated with this builder.
|
BulkOperator.Builder |
maxActions(Integer maxActions)
Modifies the max number of actions associated with this builder.
|
public BulkOperator.Builder concurrency(int concurrency)
The concurrency can not be set below 1, the builder will enforce this lower bound.
concurrency - the new concurrency value.BulkOperator.Builder instance for chaining calls.public BulkOperator.Builder interval(long interval)
interval - the new scheduled interval.BulkOperator.Builder instance for chaining calls.public BulkOperator.Builder lifecycle(@Nonnull BulkLifecycle lifecycle)
If you wish to unset a previously set lifecycle, you should
use NoopLifecycle rather than passing null.
lifecycle - the new lifecycle instance.BulkOperator.Builder instance for chaining calls.public BulkOperator.Builder maxActions(@Nullable Integer maxActions)
maxActions - the new maximum number of actions.BulkOperator.Builder instance for chaining calls.public BulkOperator build()
BulkOperator from this builder.BulkOperator instance.Copyright © 2017. All rights reserved.