Package org.elasticsearch.action.admin.indices.gateway.snapshot

Examples of org.elasticsearch.action.admin.indices.gateway.snapshot.GatewaySnapshotRequest


     * @param indices The indices the gateway snapshot will be performed on. Use <tt>null</tt> or <tt>_all</tt> to execute against all indices
     * @return The gateway snapshot request
     * @see org.elasticsearch.client.IndicesAdminClient#gatewaySnapshot(org.elasticsearch.action.admin.indices.gateway.snapshot.GatewaySnapshotRequest)
     */
    public static GatewaySnapshotRequest gatewaySnapshotRequest(String... indices) {
        return new GatewaySnapshotRequest(indices);
    }
View Full Code Here


        controller.registerHandler(POST, "/_gateway/snapshot", this);
        controller.registerHandler(POST, "/{index}/_gateway/snapshot", this);
    }

    @Override public void handleRequest(final RestRequest request, final RestChannel channel) {
        GatewaySnapshotRequest gatewaySnapshotRequest = new GatewaySnapshotRequest(RestActions.splitIndices(request.param("index")));
        gatewaySnapshotRequest.listenerThreaded(false);
        client.admin().indices().gatewaySnapshot(gatewaySnapshotRequest, new ActionListener<GatewaySnapshotResponse>() {
            @Override public void onResponse(GatewaySnapshotResponse response) {
                try {
                    XContentBuilder builder = RestXContentBuilder.restContentBuilder(request);
                    builder.startObject();
View Full Code Here

* @author kimchy (shay.banon)
*/
public class GatewaySnapshotRequestBuilder extends BaseIndicesRequestBuilder<GatewaySnapshotRequest, GatewaySnapshotResponse> {

    public GatewaySnapshotRequestBuilder(IndicesAdminClient indicesClient) {
        super(indicesClient, new GatewaySnapshotRequest());
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.admin.indices.gateway.snapshot.GatewaySnapshotRequest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.