Class FollowRequest.Builder

All Implemented Interfaces:
WithJson<FollowRequest.Builder>, ObjectBuilder<FollowRequest>
Enclosing class:
FollowRequest

public static class FollowRequest.Builder extends RequestBase.AbstractBuilder<FollowRequest.Builder> implements ObjectBuilder<FollowRequest>
Builder for FollowRequest.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • dataStreamName

      public final FollowRequest.Builder dataStreamName(@Nullable String value)
      If the leader index is part of a data stream, the name to which the local data stream for the followed index should be renamed.

      API name: data_stream_name

    • index

      public final FollowRequest.Builder index(String value)
      Required - The name of the follower index.

      API name: index

    • leaderIndex

      public final FollowRequest.Builder leaderIndex(String value)
      Required - The name of the index in the leader cluster to follow.

      API name: leader_index

    • masterTimeout

      public final FollowRequest.Builder masterTimeout(@Nullable Time value)
      Period to wait for a connection to the master node.

      API name: master_timeout

    • masterTimeout

      public final FollowRequest.Builder masterTimeout(Function<Time.Builder,ObjectBuilder<Time>> fn)
      Period to wait for a connection to the master node.

      API name: master_timeout

    • maxOutstandingReadRequests

      public final FollowRequest.Builder maxOutstandingReadRequests(@Nullable Long value)
      The maximum number of outstanding reads requests from the remote cluster.

      API name: max_outstanding_read_requests

    • maxOutstandingWriteRequests

      public final FollowRequest.Builder maxOutstandingWriteRequests(@Nullable Integer value)
      The maximum number of outstanding write requests on the follower.

      API name: max_outstanding_write_requests

    • maxReadRequestOperationCount

      public final FollowRequest.Builder maxReadRequestOperationCount(@Nullable Integer value)
      The maximum number of operations to pull per read from the remote cluster.

      API name: max_read_request_operation_count

    • maxReadRequestSize

      public final FollowRequest.Builder maxReadRequestSize(@Nullable String value)
      The maximum size in bytes of per read of a batch of operations pulled from the remote cluster.

      API name: max_read_request_size

    • maxRetryDelay

      public final FollowRequest.Builder maxRetryDelay(@Nullable Time value)
      The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when retrying.

      API name: max_retry_delay

    • maxRetryDelay

      public final FollowRequest.Builder maxRetryDelay(Function<Time.Builder,ObjectBuilder<Time>> fn)
      The maximum time to wait before retrying an operation that failed exceptionally. An exponential backoff strategy is employed when retrying.

      API name: max_retry_delay

    • maxWriteBufferCount

      public final FollowRequest.Builder maxWriteBufferCount(@Nullable Integer value)
      The maximum number of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be deferred until the number of queued operations goes below the limit.

      API name: max_write_buffer_count

    • maxWriteBufferSize

      public final FollowRequest.Builder maxWriteBufferSize(@Nullable String value)
      The maximum total bytes of operations that can be queued for writing. When this limit is reached, reads from the remote cluster will be deferred until the total bytes of queued operations goes below the limit.

      API name: max_write_buffer_size

    • maxWriteRequestOperationCount

      public final FollowRequest.Builder maxWriteRequestOperationCount(@Nullable Integer value)
      The maximum number of operations per bulk write request executed on the follower.

      API name: max_write_request_operation_count

    • maxWriteRequestSize

      public final FollowRequest.Builder maxWriteRequestSize(@Nullable String value)
      The maximum total bytes of operations per bulk write request executed on the follower.

      API name: max_write_request_size

    • readPollTimeout

      public final FollowRequest.Builder readPollTimeout(@Nullable Time value)
      The maximum time to wait for new operations on the remote cluster when the follower index is synchronized with the leader index. When the timeout has elapsed, the poll for operations will return to the follower so that it can update some statistics. Then the follower will immediately attempt to read from the leader again.

      API name: read_poll_timeout

    • readPollTimeout

      public final FollowRequest.Builder readPollTimeout(Function<Time.Builder,ObjectBuilder<Time>> fn)
      The maximum time to wait for new operations on the remote cluster when the follower index is synchronized with the leader index. When the timeout has elapsed, the poll for operations will return to the follower so that it can update some statistics. Then the follower will immediately attempt to read from the leader again.

      API name: read_poll_timeout

    • remoteCluster

      public final FollowRequest.Builder remoteCluster(String value)
      Required - The remote cluster containing the leader index.

      API name: remote_cluster

    • settings

      public final FollowRequest.Builder settings(@Nullable IndexSettings value)
      Settings to override from the leader index.

      API name: settings

    • settings

      Settings to override from the leader index.

      API name: settings

    • waitForActiveShards

      public final FollowRequest.Builder waitForActiveShards(@Nullable WaitForActiveShards value)
      Specifies the number of shards to wait on being active before responding. This defaults to waiting on none of the shards to be active. A shard must be restored from the leader index before being active. Restoring a follower shard requires transferring all the remote Lucene segment files to the follower index.

      API name: wait_for_active_shards

    • waitForActiveShards

      Specifies the number of shards to wait on being active before responding. This defaults to waiting on none of the shards to be active. A shard must be restored from the leader index before being active. Restoring a follower shard requires transferring all the remote Lucene segment files to the follower index.

      API name: wait_for_active_shards

    • self

      protected FollowRequest.Builder self()
      Specified by:
      self in class RequestBase.AbstractBuilder<FollowRequest.Builder>
    • build

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