Package org.elasticsearch.action.admin.cluster.snapshots.restore

Examples of org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequest


     * @param repository repository name
     * @param snapshot   snapshot name
     * @return snapshot creation request
     */
    public static RestoreSnapshotRequest restoreSnapshotRequest(String repository, String snapshot) {
        return new RestoreSnapshotRequest(repository, snapshot);
    }
View Full Code Here


        controller.registerHandler(POST, "/_snapshot/{repository}/{snapshot}/_restore", this);
    }

    @Override
    public void handleRequest(final RestRequest request, final RestChannel channel, final Client client) {
        RestoreSnapshotRequest restoreSnapshotRequest = restoreSnapshotRequest(request.param("repository"), request.param("snapshot"));
        restoreSnapshotRequest.masterNodeTimeout(request.paramAsTime("master_timeout", restoreSnapshotRequest.masterNodeTimeout()));
        restoreSnapshotRequest.waitForCompletion(request.paramAsBoolean("wait_for_completion", false));
        restoreSnapshotRequest.source(request.content().toUtf8());
        client.admin().cluster().restoreSnapshot(restoreSnapshotRequest, new RestToXContentListener<RestoreSnapshotResponse>(channel));
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.action.admin.cluster.snapshots.restore.RestoreSnapshotRequest

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.