@@ -49,7 +49,7 @@ public void testWatcher() throws Exception {
49
49
"}" );
50
50
PutWatchRequest request = new PutWatchRequest ("my_watch_id" , watch , XContentType .JSON );
51
51
request .setActive (false ); // <1>
52
- PutWatchResponse response = client .xpack (). watcher ().putWatch (request , RequestOptions .DEFAULT );
52
+ PutWatchResponse response = client .watcher ().putWatch (request , RequestOptions .DEFAULT );
53
53
//end::x-pack-put-watch-execute
54
54
55
55
//tag::x-pack-put-watch-response
@@ -85,7 +85,7 @@ public void onFailure(Exception e) {
85
85
listener = new LatchedActionListener <>(listener , latch );
86
86
87
87
// tag::x-pack-put-watch-execute-async
88
- client .xpack (). watcher ().putWatchAsync (request , RequestOptions .DEFAULT , listener ); // <1>
88
+ client .watcher ().putWatchAsync (request , RequestOptions .DEFAULT , listener ); // <1>
89
89
// end::x-pack-put-watch-execute-async
90
90
91
91
assertTrue (latch .await (30L , TimeUnit .SECONDS ));
@@ -94,7 +94,7 @@ public void onFailure(Exception e) {
94
94
{
95
95
//tag::x-pack-delete-watch-execute
96
96
DeleteWatchRequest request = new DeleteWatchRequest ("my_watch_id" );
97
- DeleteWatchResponse response = client .xpack (). watcher ().deleteWatch (request , RequestOptions .DEFAULT );
97
+ DeleteWatchResponse response = client .watcher ().deleteWatch (request , RequestOptions .DEFAULT );
98
98
//end::x-pack-delete-watch-execute
99
99
100
100
//tag::x-pack-delete-watch-response
@@ -125,7 +125,7 @@ public void onFailure(Exception e) {
125
125
listener = new LatchedActionListener <>(listener , latch );
126
126
127
127
// tag::x-pack-delete-watch-execute-async
128
- client .xpack (). watcher ().deleteWatchAsync (request , RequestOptions .DEFAULT , listener ); // <1>
128
+ client .watcher ().deleteWatchAsync (request , RequestOptions .DEFAULT , listener ); // <1>
129
129
// end::x-pack-delete-watch-execute-async
130
130
131
131
assertTrue (latch .await (30L , TimeUnit .SECONDS ));
0 commit comments