All Downloads are FREE. Search and download functionalities are using the official Maven repository.

tech.ytsaurus.client.request.RemountTable Maven / Gradle / Ivy

The newest version!
package tech.ytsaurus.client.request;

import tech.ytsaurus.client.rpc.RpcClientRequestBuilder;
import tech.ytsaurus.core.cypress.YPath;
import tech.ytsaurus.rpcproxy.TReqRemountTable;

public class RemountTable
        extends TableReq
        implements HighLevelRequest {
    public RemountTable(BuilderBase builder) {
        super(builder);
    }

    public RemountTable(YPath path) {
        this(builder().setPath(path.justPath()));
    }

    public static Builder builder() {
        return new Builder();
    }

    /**
     * Internal method: prepare request to send over network.
     */
    @Override
    public void writeTo(RpcClientRequestBuilder builder) {
        super.writeTo(builder.body());
    }

    @Override
    public Builder toBuilder() {
        return builder()
                .setMutatingOptions(mutatingOptions)
                .setPath(path)
                .setTabletRangeOptions(tabletRangeOptions)
                .setTimeout(timeout)
                .setRequestId(requestId)
                .setUserAgent(userAgent)
                .setTraceId(traceId, traceSampled)
                .setAdditionalData(additionalData);
    }

    public static class Builder extends BuilderBase {
        @Override
        protected Builder self() {
            return this;
        }
    }

    public abstract static class BuilderBase<
            TBuilder extends BuilderBase>
            extends TableReq.Builder {
        protected BuilderBase() {
        }

        protected BuilderBase(BuilderBase builder) {
            super(builder);
        }

        @Override
        public RemountTable build() {
            return new RemountTable(this);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy