Class GetSnapshotsRequest

All Implemented Interfaces:
Writeable, org.elasticsearch.core.RefCounted, TaskAwareRequest

public class GetSnapshotsRequest extends MasterNodeRequest<GetSnapshotsRequest>
Get snapshot request
  • Field Details

    • ALL_SNAPSHOTS

      public static final String ALL_SNAPSHOTS
      See Also:
      Constant Field Values
    • CURRENT_SNAPSHOT

      public static final String CURRENT_SNAPSHOT
      See Also:
      Constant Field Values
    • DEFAULT_VERBOSE_MODE

      public static final boolean DEFAULT_VERBOSE_MODE
      See Also:
      Constant Field Values
    • MULTIPLE_REPOSITORIES_SUPPORT_ADDED

      public static final Version MULTIPLE_REPOSITORIES_SUPPORT_ADDED
    • PAGINATED_GET_SNAPSHOTS_VERSION

      public static final Version PAGINATED_GET_SNAPSHOTS_VERSION
    • NO_LIMIT

      public static final int NO_LIMIT
      See Also:
      Constant Field Values
  • Constructor Details

    • GetSnapshotsRequest

      public GetSnapshotsRequest()
    • GetSnapshotsRequest

      public GetSnapshotsRequest(String repository, String[] snapshots)
      Constructs a new get snapshots request with given repository name and list of snapshots
      Parameters:
      repository - repository name
      snapshots - list of snapshots
    • GetSnapshotsRequest

      public GetSnapshotsRequest(String[] repositories, String[] snapshots)
      Constructs a new get snapshots request with given repository names and list of snapshots
      Parameters:
      repositories - repository names
      snapshots - list of snapshots
    • GetSnapshotsRequest

      public GetSnapshotsRequest(String... repositories)
      Constructs a new get snapshots request with given repository names
      Parameters:
      repositories - repository names
    • GetSnapshotsRequest

      public GetSnapshotsRequest(StreamInput in) throws IOException
      Throws:
      IOException
  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Overrides:
      writeTo in class MasterNodeRequest<GetSnapshotsRequest>
      Throws:
      IOException
    • validate

      Specified by:
      validate in class ActionRequest
    • repositories

      public GetSnapshotsRequest repositories(String... repositories)
      Sets repository names
      Parameters:
      repositories - repository names
      Returns:
      this request
    • repositories

      public String[] repositories()
      Returns repository names
      Returns:
      repository names
    • isSingleRepositoryRequest

      public boolean isSingleRepositoryRequest()
    • repository

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

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

      public String[] snapshots()
      Returns the names of the snapshots.
      Returns:
      the names of snapshots
    • snapshots

      public GetSnapshotsRequest snapshots(String[] snapshots)
      Sets the list of snapshots to be returned
      Returns:
      this request
    • ignoreUnavailable

      public GetSnapshotsRequest ignoreUnavailable(boolean ignoreUnavailable)
      Set to true to ignore unavailable snapshots
      Returns:
      this request
    • ignoreUnavailable

      public boolean ignoreUnavailable()
      Returns:
      Whether snapshots should be ignored when unavailable (corrupt or temporarily not fetchable)
    • verbose

      public GetSnapshotsRequest verbose(boolean verbose)
      Set to false to only show the snapshot names and the indices they contain. This is useful when the snapshots belong to a cloud-based repository where each blob read is a concern (cost wise and performance wise), as the snapshot names and indices they contain can be retrieved from a single index blob in the repository, whereas the rest of the information requires reading a snapshot metadata file for each snapshot requested. Defaults to true, which returns all information about each requested snapshot.
    • after

      public GetSnapshotsRequest.After after()
    • sort

    • after

      public GetSnapshotsRequest after(@Nullable GetSnapshotsRequest.After after)
    • sort

    • size

      public GetSnapshotsRequest size(int size)
    • size

      public int size()
    • order

      public SortOrder order()
    • order

      public GetSnapshotsRequest order(SortOrder order)
    • verbose

      public boolean verbose()
      Returns whether the request will return a verbose response.
    • createTask

      public Task createTask(long id, String type, String action, TaskId parentTaskId, Map<String,String> headers)
      Description copied from interface: TaskAwareRequest
      Returns the task object that should be used to keep track of the processing of the request.