CreateSnapshotRequest request = new CreateSnapshotRequest();
request.repository(repositoryName);
request.snapshot(snapshotName);
request.partial(false);
request.waitForCompletion(true);
CreateSnapshotResponse response = client.snapshot().create(request, RequestOptions.DEFAULT);
ElasticsearchStatusException[Elasticsearch exception [type=illegal_argument_exception, reason=request [/_snapshot/abc] contains unrecognized parameter: [wait_for_completion]]]
Current 6.4 doc lists this as an option.
request.waitForCompletion(true);
Waits for the snapshot to be completed before a response is returned.