Snapshot Delete Repository API
editSnapshot Delete Repository API
editThe Snapshot Delete Repository API allows to delete a registered repository.
Snapshot Delete Repository Request
editA DeleteRepositoryRequest
:
DeleteRepositoryRequest request = new DeleteRepositoryRequest(repositoryName);
Optional Arguments
editThe following arguments can optionally be provided:
Timeout to wait for the all the nodes to acknowledge the settings were applied
as a |
|
Timeout to wait for the all the nodes to acknowledge the settings were applied
as a |
Synchronous Execution
editDeleteRepositoryResponse response = client.snapshot().deleteRepository(request, RequestOptions.DEFAULT);
Asynchronous Execution
editThe asynchronous execution of a snapshot delete repository requires both the
DeleteRepositoryRequest
instance and an ActionListener
instance to be
passed to the asynchronous method:
The asynchronous method does not block and returns immediately. Once it is
completed the ActionListener
is called back using the onResponse
method
if the execution successfully completed or using the onFailure
method if
it failed.
A typical listener for DeleteRepositoryResponse
looks like:
Snapshot Delete Repository Response
editThe returned DeleteRepositoryResponse
allows to retrieve information about the
executed operation as follows: