Class BulkWriterOptions.Builder (3.21.1)

public abstract static class BulkWriterOptions.Builder

Inheritance

java.lang.Object > BulkWriterOptions.Builder

Constructors

Builder()

public Builder()

Methods

autoBuild()

public abstract BulkWriterOptions autoBuild()
Returns
Type Description
BulkWriterOptions

build()

public BulkWriterOptions build()
Returns
Type Description
BulkWriterOptions

setExecutor(ScheduledExecutorService executor)

public abstract BulkWriterOptions.Builder setExecutor(ScheduledExecutorService executor)

Set the executor that the BulkWriter instance schedules operations on.

Parameter
Name Description
executor ScheduledExecutorService

The executor to schedule BulkWriter operations on.

Returns
Type Description
BulkWriterOptions.Builder

setInitialOpsPerSecond(int initialOpsPerSecond)

public BulkWriterOptions.Builder setInitialOpsPerSecond(int initialOpsPerSecond)

Set the initial maximum number of operations per second allowed by the throttler.

Parameter
Name Description
initialOpsPerSecond int

The initial maximum number of operations per second allowed by the throttler.

Returns
Type Description
BulkWriterOptions.Builder

setMaxOpsPerSecond(int maxOpsPerSecond)

public BulkWriterOptions.Builder setMaxOpsPerSecond(int maxOpsPerSecond)

Set the maximum number of operations per second allowed by the throttler.

Parameter
Name Description
maxOpsPerSecond int

The maximum number of operations per second allowed by the throttler. The throttler's allowed operations per second does not ramp up past the specified operations per second.

Returns
Type Description
BulkWriterOptions.Builder

setThrottlingEnabled(boolean enabled)

public abstract BulkWriterOptions.Builder setThrottlingEnabled(boolean enabled)

Sets whether throttling should be enabled. By default, throttling is enabled.

Parameter
Name Description
enabled boolean

Whether throttling should be enabled.

Returns
Type Description
BulkWriterOptions.Builder