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

tech.ytsaurus.client.request.FreezeTable 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.TReqFreezeTable;

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

    public FreezeTable(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 {
        @Override
        public FreezeTable build() {
            return new FreezeTable(this);
        }
    }
}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy