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

io.milvus.param.control.GetCompactionStateParam Maven / Gradle / Ivy

There is a newer version: 2.4.8
Show newest version
package io.milvus.param.control;

import io.milvus.exception.ParamException;
import lombok.Getter;
import lombok.NonNull;
import lombok.ToString;


/**
 * Parameters for getCompactionState interface.
 *
 * @see Compaction function design
 */
@Getter
@ToString
public class GetCompactionStateParam {
    private final Long compactionID;

    private GetCompactionStateParam(@NonNull Builder builder) {
        this.compactionID = builder.compactionID;
    }

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

    /**
     * Builder for {@link GetCompactionStateParam} class.
     */
    public static final class Builder {
        private Long compactionID;

        private Builder() {
        }

        /**
         * Sets the compaction action id to get state.
         *
         * @param compactionID compaction action id
         * @return Builder
         */
        public Builder withCompactionID(@NonNull Long compactionID) {
            this.compactionID = compactionID;
            return this;
        }

        /**
         * Verifies parameters and creates a new {@link GetCompactionStateParam} instance.
         *
         * @return {@link GetCompactionStateParam}
         */
        public GetCompactionStateParam build() throws ParamException {
            return new GetCompactionStateParam(this);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy