}
@Override protected ShardGatewaySnapshotResponse shardOperation(ShardGatewaySnapshotRequest request) throws ElasticSearchException {
IndexShardGatewayService shardGatewayService = indicesService.indexServiceSafe(request.index())
.shardInjectorSafe(request.shardId()).getInstance(IndexShardGatewayService.class);
shardGatewayService.snapshot("api");
return new ShardGatewaySnapshotResponse(request.index(), request.shardId());
}
/**
* The snapshot request works against all primary shards.