WARNING: Deprecated in 7.15.0.
The Java REST Client is deprecated in favor of the Java API Client.
Snapshot Verify Repository APIedit
The Snapshot Verify Repository API allows to verify a registered repository.
Snapshot Verify Repository Requestedit
A VerifyRepositoryRequest
:
VerifyRepositoryRequest request = new VerifyRepositoryRequest(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
VerifyRepositoryResponse response = client.snapshot().verifyRepository(request, RequestOptions.DEFAULT);
Asynchronous Executionedit
The asynchronous execution of a snapshot verify repository requires both the
VerifyRepositoryRequest
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 VerifyRepositoryResponse
looks like:
Snapshot Verify Repository Responseedit
The returned VerifyRepositoryResponse
allows to retrieve information about the
executed operation as follows:
List<VerifyRepositoryResponse.NodeView> repositoryMetadataResponse = response.getNodes();