Class RestoreSnapshotRequest

    • Constructor Detail

      • RestoreSnapshotRequest

        public RestoreSnapshotRequest()
      • RestoreSnapshotRequest

        public RestoreSnapshotRequest​(String repository,
                                      String snapshot)
        Constructs a new put repository request with the provided repository and snapshot names.
        Parameters:
        repository - repository name
        snapshot - snapshot name
    • Method Detail

      • snapshot

        public RestoreSnapshotRequest snapshot​(String snapshot)
        Sets the name of the snapshot.
        Parameters:
        snapshot - snapshot name
        Returns:
        this request
      • snapshot

        public String snapshot()
        Returns the name of the snapshot.
        Returns:
        snapshot name
      • repository

        public RestoreSnapshotRequest repository​(String repository)
        Sets repository name
        Parameters:
        repository - repository name
        Returns:
        this request
      • repository

        public String repository()
        Returns repository name
        Returns:
        repository name
      • indices

        public RestoreSnapshotRequest indices​(String... indices)
        Sets the list of indices that should be restored from 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 not supported. An empty list or {"_all"} will restore all open indices in the snapshot.

        Parameters:
        indices - list of indices
        Returns:
        this request
      • indices

        public RestoreSnapshotRequest indices​(List<String> indices)
        Sets the list of indices that should be restored from 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 not supported. An empty list or {"_all"} will restore all open indices in the snapshot.

        Parameters:
        indices - list of indices
        Returns:
        this request
      • indices

        public String[] indices()
        Returns list of indices that should be restored from snapshot
      • indicesOptions

        public IndicesOptions indicesOptions()
        Specifies what type of requested indices to ignore and how to deal with wildcard expressions. For example indices that don't exist.
        Returns:
        the desired behaviour regarding indices to ignore and wildcard indices expression
      • indicesOptions

        public RestoreSnapshotRequest indicesOptions​(IndicesOptions indicesOptions)
        Specifies what type of requested indices to ignore and how to deal with wildcard expressions. For example indices that don't exist.
        Parameters:
        indicesOptions - the desired behaviour regarding indices to ignore and wildcard indices expressions
        Returns:
        this request
      • renamePattern

        public String renamePattern()
        Returns rename pattern
        Returns:
        rename pattern
      • renameReplacement

        public String renameReplacement()
        Returns rename replacement
        Returns:
        rename replacement
      • waitForCompletion

        public RestoreSnapshotRequest waitForCompletion​(boolean waitForCompletion)
        If this parameter is set to true the operation will wait for completion of restore process before returning.
        Parameters:
        waitForCompletion - if true the operation will wait for completion
        Returns:
        this request
      • waitForCompletion

        public boolean waitForCompletion()
        Returns wait for completion setting
        Returns:
        true if the operation will wait for completion
      • partial

        public boolean partial()
        Returns true if indices with failed to snapshot shards should be partially restored.
        Returns:
        true if indices with failed to snapshot shards should be partially restored
      • partial

        public RestoreSnapshotRequest partial​(boolean partial)
        Set to true to allow indices with failed to snapshot shards should be partially restored.
        Parameters:
        partial - true if indices with failed to snapshot shards should be partially restored.
        Returns:
        this request
      • settings

        public RestoreSnapshotRequest settings​(Settings settings)
        Sets repository-specific restore settings.

        See repository documentation for more information.

        Parameters:
        settings - repository-specific snapshot settings
        Returns:
        this request
      • settings

        public RestoreSnapshotRequest settings​(Settings.Builder settings)
        Sets repository-specific restore settings.

        See repository documentation for more information.

        Parameters:
        settings - repository-specific snapshot settings
        Returns:
        this request
      • settings

        public RestoreSnapshotRequest settings​(String source,
                                               XContentType xContentType)
        Sets repository-specific restore settings in JSON or YAML format

        See repository documentation for more information.

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

        public RestoreSnapshotRequest settings​(Map<String,​Object> source)
        Sets repository-specific restore settings

        See repository documentation for more information.

        Parameters:
        source - repository-specific snapshot settings
        Returns:
        this request
      • settings

        public Settings settings()
        Returns repository-specific restore settings
        Returns:
        restore settings
      • ignoreIndexSettings

        public RestoreSnapshotRequest ignoreIndexSettings​(String... ignoreIndexSettings)
        Sets the list of index settings and index settings groups that shouldn't be restored from snapshot
      • ignoreIndexSettings

        public RestoreSnapshotRequest ignoreIndexSettings​(List<String> ignoreIndexSettings)
        Sets the list of index settings and index settings groups that shouldn't be restored from snapshot
      • ignoreIndexSettings

        public String[] ignoreIndexSettings()
        Returns the list of index settings and index settings groups that shouldn't be restored from snapshot
      • includeGlobalState

        public RestoreSnapshotRequest includeGlobalState​(boolean includeGlobalState)
        If set to true the restore procedure will restore global cluster state.

        The global cluster state includes persistent settings and index template definitions.

        Parameters:
        includeGlobalState - true if global state should be restored from the snapshot
        Returns:
        this request
      • includeGlobalState

        public boolean includeGlobalState()
        Returns true if global state should be restored from this snapshot
        Returns:
        true if global state should be restored
      • includeAliases

        public RestoreSnapshotRequest includeAliases​(boolean includeAliases)
        If set to true the restore procedure will restore aliases
        Parameters:
        includeAliases - true if aliases should be restored from the snapshot
        Returns:
        this request
      • includeAliases

        public boolean includeAliases()
        Returns true if aliases should be restored from this snapshot
        Returns:
        true if aliases should be restored
      • indexSettings

        public RestoreSnapshotRequest indexSettings​(Settings settings)
        Sets settings that should be added/changed in all restored indices
      • indexSettings

        public Settings indexSettings()
        Returns settings that should be added/changed in all restored indices
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object