Class SnapshotClient

java.lang.Object
org.elasticsearch.client.SnapshotClient

public final class SnapshotClient
extends java.lang.Object
A wrapper for the RestHighLevelClient that provides methods for accessing the Snapshot API.

See Snapshot API on elastic.co

  • Method Summary

    Modifier and Type Method Description
    org.elasticsearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryResponse cleanupRepository​(org.elasticsearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryRequest cleanupRepositoryRequest, org.elasticsearch.client.RequestOptions options)
    Cleans up a snapshot repository.
    org.elasticsearch.client.Cancellable cleanupRepositoryAsync​(org.elasticsearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryRequest cleanupRepositoryRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryResponse> listener)
    Asynchronously cleans up a snapshot repository.
    org.elasticsearch.action.support.master.AcknowledgedResponse clone​(org.elasticsearch.action.admin.cluster.snapshots.clone.CloneSnapshotRequest cloneSnapshotRequest, org.elasticsearch.client.RequestOptions options)
    Clones a snapshot.
    org.elasticsearch.client.Cancellable cloneAsync​(org.elasticsearch.action.admin.cluster.snapshots.clone.CloneSnapshotRequest cloneSnapshotRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.support.master.AcknowledgedResponse> listener)
    Asynchronously clones a snapshot.
    org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse create​(org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequest createSnapshotRequest, org.elasticsearch.client.RequestOptions options)
    Creates a snapshot.
    org.elasticsearch.client.Cancellable createAsync​(org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequest createSnapshotRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse> listener)
    Asynchronously creates a snapshot.
    org.elasticsearch.action.support.master.AcknowledgedResponse createRepository​(org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryRequest putRepositoryRequest, org.elasticsearch.client.RequestOptions options)
    Creates a snapshot repository.
    org.elasticsearch.client.Cancellable createRepositoryAsync​(org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryRequest putRepositoryRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.support.master.AcknowledgedResponse> listener)
    Asynchronously creates a snapshot repository.
    org.elasticsearch.action.support.master.AcknowledgedResponse delete​(org.elasticsearch.action.admin.cluster.snapshots.delete.DeleteSnapshotRequest deleteSnapshotRequest, org.elasticsearch.client.RequestOptions options)
    Deletes a snapshot.
    org.elasticsearch.client.Cancellable deleteAsync​(org.elasticsearch.action.admin.cluster.snapshots.delete.DeleteSnapshotRequest deleteSnapshotRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.support.master.AcknowledgedResponse> listener)
    Asynchronously deletes a snapshot.
    org.elasticsearch.action.support.master.AcknowledgedResponse deleteRepository​(org.elasticsearch.action.admin.cluster.repositories.delete.DeleteRepositoryRequest deleteRepositoryRequest, org.elasticsearch.client.RequestOptions options)
    Deletes a snapshot repository.
    org.elasticsearch.client.Cancellable deleteRepositoryAsync​(org.elasticsearch.action.admin.cluster.repositories.delete.DeleteRepositoryRequest deleteRepositoryRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.support.master.AcknowledgedResponse> listener)
    Asynchronously deletes a snapshot repository.
    org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse get​(org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsRequest getSnapshotsRequest, org.elasticsearch.client.RequestOptions options)
    Get snapshots.
    org.elasticsearch.client.Cancellable getAsync​(org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsRequest getSnapshotsRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse> listener)
    Asynchronously get snapshots.
    org.elasticsearch.action.admin.cluster.repositories.get.GetRepositoriesResponse getRepository​(org.elasticsearch.action.admin.cluster.repositories.get.GetRepositoriesRequest getRepositoriesRequest, org.elasticsearch.client.RequestOptions options)
    Gets a list of snapshot repositories.
    org.elasticsearch.client.Cancellable getRepositoryAsync​(org.elasticsearch.action.admin.cluster.repositories.get.GetRepositoriesRequest getRepositoriesRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.admin.cluster.repositories.get.GetRepositoriesResponse> listener)
    Asynchronously gets a list of snapshot repositories.
    org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse restore​(org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequest restoreSnapshotRequest, org.elasticsearch.client.RequestOptions options)
    Restores a snapshot.
    org.elasticsearch.client.Cancellable restoreAsync​(org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequest restoreSnapshotRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse> listener)
    Asynchronously restores a snapshot.
    org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse status​(org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotsStatusRequest snapshotsStatusRequest, org.elasticsearch.client.RequestOptions options)
    Gets the status of requested snapshots.
    org.elasticsearch.client.Cancellable statusAsync​(org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotsStatusRequest snapshotsStatusRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse> listener)
    Asynchronously gets the status of requested snapshots.
    org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse verifyRepository​(org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryRequest verifyRepositoryRequest, org.elasticsearch.client.RequestOptions options)
    Verifies a snapshot repository.
    org.elasticsearch.client.Cancellable verifyRepositoryAsync​(org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryRequest verifyRepositoryRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse> listener)
    Asynchronously verifies a snapshot repository.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getRepository

      public org.elasticsearch.action.admin.cluster.repositories.get.GetRepositoriesResponse getRepository​(org.elasticsearch.action.admin.cluster.repositories.get.GetRepositoriesRequest getRepositoriesRequest, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Gets a list of snapshot repositories. If the list of repositories is empty or it contains a single element "_all", all registered repositories are returned. See Snapshot and Restore API on elastic.co
      Parameters:
      getRepositoriesRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • getRepositoryAsync

      public org.elasticsearch.client.Cancellable getRepositoryAsync​(org.elasticsearch.action.admin.cluster.repositories.get.GetRepositoriesRequest getRepositoriesRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.admin.cluster.repositories.get.GetRepositoriesResponse> listener)
      Asynchronously gets a list of snapshot repositories. If the list of repositories is empty or it contains a single element "_all", all registered repositories are returned. See Snapshot and Restore API on elastic.co
      Parameters:
      getRepositoriesRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request
    • createRepository

      public org.elasticsearch.action.support.master.AcknowledgedResponse createRepository​(org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryRequest putRepositoryRequest, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Creates a snapshot repository. See Snapshot and Restore API on elastic.co
      Parameters:
      putRepositoryRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • createRepositoryAsync

      public org.elasticsearch.client.Cancellable createRepositoryAsync​(org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryRequest putRepositoryRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.support.master.AcknowledgedResponse> listener)
      Asynchronously creates a snapshot repository. See Snapshot and Restore API on elastic.co
      Parameters:
      putRepositoryRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request
    • deleteRepository

      public org.elasticsearch.action.support.master.AcknowledgedResponse deleteRepository​(org.elasticsearch.action.admin.cluster.repositories.delete.DeleteRepositoryRequest deleteRepositoryRequest, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Deletes a snapshot repository. See Snapshot and Restore API on elastic.co
      Parameters:
      deleteRepositoryRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • deleteRepositoryAsync

      public org.elasticsearch.client.Cancellable deleteRepositoryAsync​(org.elasticsearch.action.admin.cluster.repositories.delete.DeleteRepositoryRequest deleteRepositoryRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.support.master.AcknowledgedResponse> listener)
      Asynchronously deletes a snapshot repository. See Snapshot and Restore API on elastic.co
      Parameters:
      deleteRepositoryRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request
    • verifyRepository

      public org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse verifyRepository​(org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryRequest verifyRepositoryRequest, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Verifies a snapshot repository. See Snapshot and Restore API on elastic.co
      Parameters:
      verifyRepositoryRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • verifyRepositoryAsync

      public org.elasticsearch.client.Cancellable verifyRepositoryAsync​(org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryRequest verifyRepositoryRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.admin.cluster.repositories.verify.VerifyRepositoryResponse> listener)
      Asynchronously verifies a snapshot repository. See Snapshot and Restore API on elastic.co
      Parameters:
      verifyRepositoryRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request
    • cleanupRepository

      public org.elasticsearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryResponse cleanupRepository​(org.elasticsearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryRequest cleanupRepositoryRequest, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Cleans up a snapshot repository. See Snapshot and Restore API on elastic.co
      Parameters:
      cleanupRepositoryRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • cleanupRepositoryAsync

      public org.elasticsearch.client.Cancellable cleanupRepositoryAsync​(org.elasticsearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryRequest cleanupRepositoryRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.admin.cluster.repositories.cleanup.CleanupRepositoryResponse> listener)
      Asynchronously cleans up a snapshot repository. See Snapshot and Restore API on elastic.co
      Parameters:
      cleanupRepositoryRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request
    • create

      public org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse create​(org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequest createSnapshotRequest, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Throws:
      java.io.IOException
    • createAsync

      public org.elasticsearch.client.Cancellable createAsync​(org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotRequest createSnapshotRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse> listener)
      Asynchronously creates a snapshot.

      See Snapshot and Restore API on elastic.co

      Returns:
      cancellable that may be used to cancel the request
    • clone

      public org.elasticsearch.action.support.master.AcknowledgedResponse clone​(org.elasticsearch.action.admin.cluster.snapshots.clone.CloneSnapshotRequest cloneSnapshotRequest, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Throws:
      java.io.IOException
    • cloneAsync

      public org.elasticsearch.client.Cancellable cloneAsync​(org.elasticsearch.action.admin.cluster.snapshots.clone.CloneSnapshotRequest cloneSnapshotRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.support.master.AcknowledgedResponse> listener)
      Asynchronously clones a snapshot.

      See Snapshot and Restore API on elastic.co

      Returns:
      cancellable that may be used to cancel the request
    • get

      public org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse get​(org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsRequest getSnapshotsRequest, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Parameters:
      getSnapshotsRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • getAsync

      public org.elasticsearch.client.Cancellable getAsync​(org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsRequest getSnapshotsRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsResponse> listener)
      Asynchronously get snapshots. See Snapshot and Restore API on elastic.co
      Parameters:
      getSnapshotsRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request
    • status

      public org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse status​(org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotsStatusRequest snapshotsStatusRequest, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Gets the status of requested snapshots. See Snapshot and Restore API on elastic.co
      Parameters:
      snapshotsStatusRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • statusAsync

      public org.elasticsearch.client.Cancellable statusAsync​(org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotsStatusRequest snapshotsStatusRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.admin.cluster.snapshots.status.SnapshotsStatusResponse> listener)
      Asynchronously gets the status of requested snapshots. See Snapshot and Restore API on elastic.co
      Parameters:
      snapshotsStatusRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request
    • restore

      public org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse restore​(org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequest restoreSnapshotRequest, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Parameters:
      restoreSnapshotRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • restoreAsync

      public org.elasticsearch.client.Cancellable restoreAsync​(org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequest restoreSnapshotRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotResponse> listener)
      Asynchronously restores a snapshot. See Snapshot and Restore API on elastic.co
      Parameters:
      restoreSnapshotRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request
    • delete

      public org.elasticsearch.action.support.master.AcknowledgedResponse delete​(org.elasticsearch.action.admin.cluster.snapshots.delete.DeleteSnapshotRequest deleteSnapshotRequest, org.elasticsearch.client.RequestOptions options) throws java.io.IOException
      Parameters:
      deleteSnapshotRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      Returns:
      the response
      Throws:
      java.io.IOException - in case there is a problem sending the request or parsing back the response
    • deleteAsync

      public org.elasticsearch.client.Cancellable deleteAsync​(org.elasticsearch.action.admin.cluster.snapshots.delete.DeleteSnapshotRequest deleteSnapshotRequest, org.elasticsearch.client.RequestOptions options, org.elasticsearch.action.ActionListener<org.elasticsearch.action.support.master.AcknowledgedResponse> listener)
      Asynchronously deletes a snapshot. See Snapshot and Restore API on elastic.co
      Parameters:
      deleteSnapshotRequest - the request
      options - the request options (e.g. headers), use RequestOptions.DEFAULT if nothing needs to be customized
      listener - the listener to be notified upon request completion
      Returns:
      cancellable that may be used to cancel the request