Class SnapshotsStatusRequest

All Implemented Interfaces:
Writeable, org.elasticsearch.common.util.concurrent.RefCounted, TaskAwareRequest

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

    • SnapshotsStatusRequest

      public SnapshotsStatusRequest()
    • SnapshotsStatusRequest

      public SnapshotsStatusRequest​(java.lang.String repository, java.lang.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 java.io.IOException
      Throws:
      java.io.IOException
    • SnapshotsStatusRequest

      public SnapshotsStatusRequest​(java.lang.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 java.io.IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Overrides:
      writeTo in class MasterNodeRequest<SnapshotsStatusRequest>
      Throws:
      java.io.IOException
    • validate

      Specified by:
      validate in class ActionRequest
    • repository

      public SnapshotsStatusRequest repository​(java.lang.String repository)
      Sets repository name
      Parameters:
      repository - repository name
      Returns:
      this request
    • repository

      public java.lang.String repository()
      Returns repository name
      Returns:
      repository name
    • snapshots

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

      public SnapshotsStatusRequest snapshots​(java.lang.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