Class CreateSnapshotRequestBuilder


Create snapshot request builder
  • Constructor Details

  • Method Details

    • setSnapshot

      public CreateSnapshotRequestBuilder setSnapshot(String snapshot)
      Sets the snapshot name
      Parameters:
      snapshot - snapshot name
      Returns:
      this builder
    • setRepository

      public CreateSnapshotRequestBuilder setRepository(String repository)
      Sets the repository name
      Parameters:
      repository - repository name
      Returns:
      this builder
    • setIndices

      public CreateSnapshotRequestBuilder setIndices(String... indices)
      Sets a list of indices that should be included into the snapshot

      The list of indices supports multi-index syntax. For example: "+test*" ,"-test42" will index all indices with prefix "test" except index "test42". Aliases are supported. An empty list or {"_all"} will snapshot all open indices in the cluster.

      Returns:
      this builder
    • setIndicesOptions

      public CreateSnapshotRequestBuilder setIndicesOptions(IndicesOptions indicesOptions)
      Specifies the indices options. Like what type of requested indices to ignore. For example indices that don't exist.
      Parameters:
      indicesOptions - the desired behaviour regarding indices options
      Returns:
      this request
    • setWaitForCompletion

      public CreateSnapshotRequestBuilder setWaitForCompletion(boolean waitForCompletion)
      If set to true the request should wait for the snapshot completion before returning.
      Parameters:
      waitForCompletion - true if
      Returns:
      this builder
    • setPartial

      public CreateSnapshotRequestBuilder setPartial(boolean partial)
      If set to true the request should snapshot indices with unavailable shards
      Parameters:
      partial - true if request should snapshot indices with unavailable shards
      Returns:
      this builder
    • setSettings

      public CreateSnapshotRequestBuilder setSettings(Settings settings)
      Sets repository-specific snapshot settings.

      See repository documentation for more information.

      Parameters:
      settings - repository-specific snapshot settings
      Returns:
      this builder
    • setSettings

      public CreateSnapshotRequestBuilder setSettings(Settings.Builder settings)
      Sets repository-specific snapshot settings.

      See repository documentation for more information.

      Parameters:
      settings - repository-specific snapshot settings
      Returns:
      this builder
    • setSettings

      public CreateSnapshotRequestBuilder setSettings(String source, XContentType xContentType)
      Sets repository-specific snapshot settings in YAML or JSON format

      See repository documentation for more information.

      Parameters:
      source - repository-specific snapshot settings
      xContentType - the content type of the source
      Returns:
      this builder
    • setSettings

      public CreateSnapshotRequestBuilder setSettings(Map<String,Object> settings)
      Sets repository-specific snapshot settings.

      See repository documentation for more information.

      Parameters:
      settings - repository-specific snapshot settings
      Returns:
      this builder
    • setIncludeGlobalState

      public CreateSnapshotRequestBuilder setIncludeGlobalState(boolean includeGlobalState)
      Set to true if snapshot should include global cluster state
      Parameters:
      includeGlobalState - true if snapshot should include global cluster state
      Returns:
      this builder
    • setFeatureStates

      public CreateSnapshotRequestBuilder setFeatureStates(String... featureStates)
      Provide a list of features whose state indices should be included in the snapshot
      Parameters:
      featureStates - A list of feature names
      Returns:
      this builder
    • setUserMetadata

      public CreateSnapshotRequestBuilder setUserMetadata(@Nullable Map<String,Object> metadata)
      Provide a map of user metadata that should be included in the snapshot metadata.
      Parameters:
      metadata - user metadata map
      Returns:
      this builder