Snapshot Delete Repository APIedit
The Snapshot Delete Repository API allows to delete a registered repository.
Snapshot Delete Repository Requestedit
A DeleteRepositoryRequest
:
DeleteRepositoryRequest request = new DeleteRepositoryRequest(repositoryName);
Optional Argumentsedit
The 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 Executionedit
AcknowledgedResponse response = client.snapshot().deleteRepository(request, RequestOptions.DEFAULT);
Asynchronous Executionedit
The 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 Responseedit
The returned DeleteRepositoryResponse
allows to retrieve information about the
executed operation as follows: