Class BulkWriterOptions.Builder

java.lang.Object
com.google.cloud.firestore.BulkWriterOptions.Builder
Enclosing class:
BulkWriterOptions

public abstract static class BulkWriterOptions.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • setThrottlingEnabled

      public abstract BulkWriterOptions.Builder setThrottlingEnabled(boolean enabled)
      Sets whether throttling should be enabled. By default, throttling is enabled.
      Parameters:
      enabled - Whether throttling should be enabled.
    • setInitialOpsPerSecond

      public BulkWriterOptions.Builder setInitialOpsPerSecond(int initialOpsPerSecond)
      Set the initial maximum number of operations per second allowed by the throttler.
      Parameters:
      initialOpsPerSecond - The initial maximum number of operations per second allowed by the throttler.
    • setMaxOpsPerSecond

      public BulkWriterOptions.Builder setMaxOpsPerSecond(int maxOpsPerSecond)
      Set the maximum number of operations per second allowed by the throttler.
      Parameters:
      maxOpsPerSecond - 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.
    • setExecutor

      public abstract BulkWriterOptions.Builder setExecutor(@Nullable ScheduledExecutorService executor)
      Set the executor that the BulkWriter instance schedules operations on.
      Parameters:
      executor - The executor to schedule BulkWriter operations on.
    • autoBuild

      public abstract BulkWriterOptions autoBuild()
    • build

      @Nonnull public BulkWriterOptions build()