Package org.elasticsearch.client
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.
-
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.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.
-
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.IOExceptionGets 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 requestoptions
- the request options (e.g. headers), useRequestOptions.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 requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- 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.IOExceptionCreates a snapshot repository. See Snapshot and Restore API on elastic.co- Parameters:
putRepositoryRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.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 requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- 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.IOExceptionDeletes a snapshot repository. See Snapshot and Restore API on elastic.co- Parameters:
deleteRepositoryRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.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 requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- 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.IOExceptionVerifies a snapshot repository. See Snapshot and Restore API on elastic.co- Parameters:
verifyRepositoryRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.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 requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- 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.IOExceptionCleans up a snapshot repository. See Snapshot and Restore API on elastic.co- Parameters:
cleanupRepositoryRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.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 requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- 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.IOExceptionCreates a snapshot.- 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.- 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.IOExceptionGet snapshots. See Snapshot and Restore API on elastic.co- Parameters:
getSnapshotsRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.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 requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- 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.IOExceptionGets the status of requested snapshots. See Snapshot and Restore API on elastic.co- Parameters:
snapshotsStatusRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.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 requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- 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.IOExceptionRestores a snapshot. See Snapshot and Restore API on elastic.co- Parameters:
restoreSnapshotRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.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 requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- 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.IOExceptionDeletes a snapshot. See Snapshot and Restore API on elastic.co- Parameters:
deleteSnapshotRequest
- the requestoptions
- the request options (e.g. headers), useRequestOptions.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 requestoptions
- the request options (e.g. headers), useRequestOptions.DEFAULT
if nothing needs to be customizedlistener
- the listener to be notified upon request completion- Returns:
- cancellable that may be used to cancel the request
-