Class SnapshotsStatusRequest

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

public class SnapshotsStatusRequest extends MasterNodeRequest<SnapshotsStatusRequest>
Get snapshot status request
  • Constructor Details

    • SnapshotsStatusRequest

      public SnapshotsStatusRequest()
    • SnapshotsStatusRequest

      public SnapshotsStatusRequest(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
    • SnapshotsStatusRequest

      public SnapshotsStatusRequest(StreamInput in) throws IOException
      Throws:
      IOException
    • SnapshotsStatusRequest

      public SnapshotsStatusRequest(String repository)
      Constructs a new get snapshots request with given repository name
      Parameters:
      repository - repository name
  • 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<SnapshotsStatusRequest>
      Throws:
      IOException
    • validate

      Specified by:
      validate in class ActionRequest
    • 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.
    • repository

      public SnapshotsStatusRequest 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 SnapshotsStatusRequest snapshots(String[] snapshots)
      Sets the list of snapshots to be returned
      Returns:
      this request
    • ignoreUnavailable

      public SnapshotsStatusRequest ignoreUnavailable(boolean ignoreUnavailable)
      Set to true to ignore unavailable snapshots, instead of throwing an exception. Defaults to false, which means unavailable snapshots cause an exception to be thrown.
      Parameters:
      ignoreUnavailable - whether to ignore unavailable snapshots
      Returns:
      this request
    • ignoreUnavailable

      public boolean ignoreUnavailable()
      Returns whether the request permits unavailable snapshots to be ignored.
      Returns:
      true if the request will ignore unavailable snapshots, false if it will throw an exception on unavailable snapshots
    • getDescription

      public String getDescription()
      Description copied from interface: TaskAwareRequest
      Returns optional description of the request to be displayed by the task manager