Package org.elasticsearch.client
Class SnapshotClient
- java.lang.Object
-
- org.elasticsearch.client.SnapshotClient
-
public final class SnapshotClient extends java.lang.ObjectA wrapper for theRestHighLevelClientthat provides methods for accessing the Snapshot API.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateSnapshotResponsecreate(CreateSnapshotRequest createSnapshotRequest, RequestOptions options)Creates a snapshot.voidcreateAsync(CreateSnapshotRequest createSnapshotRequest, RequestOptions options, ActionListener<CreateSnapshotResponse> listener)Asynchronously creates a snapshot.AcknowledgedResponsecreateRepository(PutRepositoryRequest putRepositoryRequest, RequestOptions options)Creates a snapshot repository.voidcreateRepositoryAsync(PutRepositoryRequest putRepositoryRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously creates a snapshot repository.AcknowledgedResponsedelete(DeleteSnapshotRequest deleteSnapshotRequest, RequestOptions options)Deletes a snapshot.voiddeleteAsync(DeleteSnapshotRequest deleteSnapshotRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously deletes a snapshot.AcknowledgedResponsedeleteRepository(DeleteRepositoryRequest deleteRepositoryRequest, RequestOptions options)Deletes a snapshot repository.voiddeleteRepositoryAsync(DeleteRepositoryRequest deleteRepositoryRequest, RequestOptions options, ActionListener<AcknowledgedResponse> listener)Asynchronously deletes a snapshot repository.GetSnapshotsResponseget(GetSnapshotsRequest getSnapshotsRequest, RequestOptions options)Get snapshots.voidgetAsync(GetSnapshotsRequest getSnapshotsRequest, RequestOptions options, ActionListener<GetSnapshotsResponse> listener)Asynchronously get snapshots.GetRepositoriesResponsegetRepository(GetRepositoriesRequest getRepositoriesRequest, RequestOptions options)Gets a list of snapshot repositories.voidgetRepositoryAsync(GetRepositoriesRequest getRepositoriesRequest, RequestOptions options, ActionListener<GetRepositoriesResponse> listener)Asynchronously gets a list of snapshot repositories.RestoreSnapshotResponserestore(RestoreSnapshotRequest restoreSnapshotRequest, RequestOptions options)Restores a snapshot.voidrestoreAsync(RestoreSnapshotRequest restoreSnapshotRequest, RequestOptions options, ActionListener<RestoreSnapshotResponse> listener)Asynchronously restores a snapshot.SnapshotsStatusResponsestatus(SnapshotsStatusRequest snapshotsStatusRequest, RequestOptions options)Gets the status of requested snapshots.voidstatusAsync(SnapshotsStatusRequest snapshotsStatusRequest, RequestOptions options, ActionListener<SnapshotsStatusResponse> listener)Asynchronously gets the status of requested snapshots.VerifyRepositoryResponseverifyRepository(VerifyRepositoryRequest verifyRepositoryRequest, RequestOptions options)Verifies a snapshot repository.voidverifyRepositoryAsync(VerifyRepositoryRequest verifyRepositoryRequest, RequestOptions options, ActionListener<VerifyRepositoryResponse> listener)Asynchronously verifies a snapshot repository.
-
-
-
Method Detail
-
getRepository
public GetRepositoriesResponse getRepository(GetRepositoriesRequest getRepositoriesRequest, 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 requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif 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 void getRepositoryAsync(GetRepositoriesRequest getRepositoriesRequest, RequestOptions options, ActionListener<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.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
createRepository
public AcknowledgedResponse createRepository(PutRepositoryRequest putRepositoryRequest, RequestOptions options) throws java.io.IOException
Creates a snapshot repository. See Snapshot and Restore API on elastic.co- Parameters:
putRepositoryRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif 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 void createRepositoryAsync(PutRepositoryRequest putRepositoryRequest, RequestOptions options, ActionListener<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.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
deleteRepository
public AcknowledgedResponse deleteRepository(DeleteRepositoryRequest deleteRepositoryRequest, RequestOptions options) throws java.io.IOException
Deletes a snapshot repository. See Snapshot and Restore API on elastic.co- Parameters:
deleteRepositoryRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif 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 void deleteRepositoryAsync(DeleteRepositoryRequest deleteRepositoryRequest, RequestOptions options, ActionListener<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.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
verifyRepository
public VerifyRepositoryResponse verifyRepository(VerifyRepositoryRequest verifyRepositoryRequest, RequestOptions options) throws java.io.IOException
Verifies a snapshot repository. See Snapshot and Restore API on elastic.co- Parameters:
verifyRepositoryRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif 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 void verifyRepositoryAsync(VerifyRepositoryRequest verifyRepositoryRequest, RequestOptions options, ActionListener<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.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
create
public CreateSnapshotResponse create(CreateSnapshotRequest createSnapshotRequest, RequestOptions options) throws java.io.IOException
Creates a snapshot.- Throws:
java.io.IOException
-
createAsync
public void createAsync(CreateSnapshotRequest createSnapshotRequest, RequestOptions options, ActionListener<CreateSnapshotResponse> listener)
Asynchronously creates a snapshot.
-
get
public GetSnapshotsResponse get(GetSnapshotsRequest getSnapshotsRequest, RequestOptions options) throws java.io.IOException
Get snapshots. See Snapshot and Restore API on elastic.co- Parameters:
getSnapshotsRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif 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 void getAsync(GetSnapshotsRequest getSnapshotsRequest, RequestOptions options, ActionListener<GetSnapshotsResponse> listener)
Asynchronously get snapshots. See Snapshot and Restore API on elastic.co- Parameters:
getSnapshotsRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
status
public SnapshotsStatusResponse status(SnapshotsStatusRequest snapshotsStatusRequest, RequestOptions options) throws java.io.IOException
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.DEFAULTif 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 void statusAsync(SnapshotsStatusRequest snapshotsStatusRequest, RequestOptions options, ActionListener<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.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
restore
public RestoreSnapshotResponse restore(RestoreSnapshotRequest restoreSnapshotRequest, RequestOptions options) throws java.io.IOException
Restores a snapshot. See Snapshot and Restore API on elastic.co- Parameters:
restoreSnapshotRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif 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 void restoreAsync(RestoreSnapshotRequest restoreSnapshotRequest, RequestOptions options, ActionListener<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.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
delete
public AcknowledgedResponse delete(DeleteSnapshotRequest deleteSnapshotRequest, RequestOptions options) throws java.io.IOException
Deletes a snapshot. See Snapshot and Restore API on elastic.co- Parameters:
deleteSnapshotRequest- the requestoptions- the request options (e.g. headers), useRequestOptions.DEFAULTif 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 void deleteAsync(DeleteSnapshotRequest deleteSnapshotRequest, RequestOptions options, ActionListener<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.DEFAULTif nothing needs to be customizedlistener- the listener to be notified upon request completion
-
-