ReplicationPingRequest replicationPingRequest = new ReplicationPingRequest(RestActions.splitIndices(request.param("index")));
replicationPingRequest.timeout(request.paramAsTime("timeout", ShardReplicationPingRequest.DEFAULT_TIMEOUT));
replicationPingRequest.listenerThreaded(false);
String replicationType = request.param("replication");
if (replicationType != null) {
replicationPingRequest.replicationType(ReplicationType.fromString(replicationType));
}
client.admin().cluster().ping(replicationPingRequest, new ActionListener<ReplicationPingResponse>() {
@Override public void onResponse(ReplicationPingResponse result) {
try {
XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);