| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 | [[java-rest-high-snapshot-verify-repository]]=== Snapshot Verify Repository APIThe Snapshot Verify Repository API allows to verify a registered repository.[[java-rest-high-snapshot-verify-repository-request]]==== Snapshot Verify Repository RequestA `VerifyRepositoryRequest`:["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/SnapshotClientDocumentationIT.java[verify-repository-request]--------------------------------------------------==== Optional ArgumentsThe following arguments can optionally be provided:["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/SnapshotClientDocumentationIT.java[create-repository-request-timeout]--------------------------------------------------<1> Timeout to wait for the all the nodes to acknowledge the settings were appliedas a `TimeValue`<2> Timeout to wait for the all the nodes to acknowledge the settings were appliedas a `String`["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/SnapshotClientDocumentationIT.java[verify-repository-request-masterTimeout]--------------------------------------------------<1> Timeout to connect to the master node as a `TimeValue`<2> Timeout to connect to the master node as a `String`[[java-rest-high-snapshot-verify-repository-sync]]==== Synchronous Execution["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/SnapshotClientDocumentationIT.java[verify-repository-execute]--------------------------------------------------[[java-rest-high-snapshot-verify-repository-async]]==== Asynchronous ExecutionThe asynchronous execution of a snapshot verify repository requires both the`VerifyRepositoryRequest` instance and an `ActionListener` instance to bepassed to the asynchronous method:["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/SnapshotClientDocumentationIT.java[verify-repository-execute-async]--------------------------------------------------<1> The `VerifyRepositoryRequest` to execute and the `ActionListener`to use when the execution completesThe asynchronous method does not block and returns immediately. Once it iscompleted the `ActionListener` is called back using the `onResponse` methodif the execution successfully completed or using the `onFailure` method ifit failed.A typical listener for `VerifyRepositoryResponse` looks like:["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/SnapshotClientDocumentationIT.java[verify-repository-execute-listener]--------------------------------------------------<1> Called when the execution is successfully completed. The response isprovided as an argument<2> Called in case of a failure. The raised exception is provided as an argument[[java-rest-high-cluster-verify-repository-response]]==== Snapshot Verify Repository ResponseThe returned `VerifyRepositoryResponse` allows to retrieve information about theexecuted operation as follows:["source","java",subs="attributes,callouts,macros"]--------------------------------------------------include-tagged::{doc-tests}/SnapshotClientDocumentationIT.java[verify-repository-response]--------------------------------------------------
 |