Class Translog.Builder

java.lang.Object
All Implemented Interfaces:
WithJson<Translog.Builder>, ObjectBuilder<Translog>
Enclosing class:
Translog

public static class Translog.Builder
extends WithJsonObjectBuilderBase<Translog.Builder>
implements ObjectBuilder<Translog>
Builder for Translog.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • syncInterval

      public final Translog.Builder syncInterval​(@Nullable Time value)
      How often the translog is fsynced to disk and committed, regardless of write operations. Values less than 100ms are not allowed.

      API name: sync_interval

    • syncInterval

      public final Translog.Builder syncInterval​(java.util.function.Function<Time.Builder,​ObjectBuilder<Time>> fn)
      How often the translog is fsynced to disk and committed, regardless of write operations. Values less than 100ms are not allowed.

      API name: sync_interval

    • durability

      public final Translog.Builder durability​(@Nullable TranslogDurability value)
      Whether or not to fsync and commit the translog after every index, delete, update, or bulk request.

      API name: durability

    • flushThresholdSize

      public final Translog.Builder flushThresholdSize​(@Nullable java.lang.String value)
      The translog stores all operations that are not yet safely persisted in Lucene (i.e., are not part of a Lucene commit point). Although these operations are available for reads, they will need to be replayed if the shard was stopped and had to be recovered. This setting controls the maximum total size of these operations, to prevent recoveries from taking too long. Once the maximum size has been reached a flush will happen, generating a new Lucene commit point.

      API name: flush_threshold_size

    • retention

      public final Translog.Builder retention​(@Nullable TranslogRetention value)
      API name: retention
    • retention

      public final Translog.Builder retention​(java.util.function.Function<TranslogRetention.Builder,​ObjectBuilder<TranslogRetention>> fn)
      API name: retention
    • self

      protected Translog.Builder self()
      Specified by:
      self in class WithJsonObjectBuilderBase<Translog.Builder>
    • build

      public Translog build()
      Builds a Translog.
      Specified by:
      build in interface ObjectBuilder<Translog>
      Throws:
      java.lang.NullPointerException - if some of the required fields are null.