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

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

Go to download

Java SDK for Milvus, a distributed high-performance vector search engine. update grpc to 1.42.1 update protobuf to 3.19.1

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

import io.milvus.exception.ParamException;
import io.milvus.param.ParamUtils;
import lombok.Getter;
import lombok.NonNull;

/**
 * Parameters for manualCompact interface.
 *
 * @see Compaction function design
 */
@Getter
public class ManualCompactParam {
    private final String collectionName;

    private ManualCompactParam(@NonNull Builder builder) {
        this.collectionName = builder.collectionName;
    }

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

    /**
     * Constructs a String by {@link ManualCompactParam} instance.
     *
     * @return String
     */
    @Override
    public String toString() {
        return "ManualCompactionParam{" +
                "collectionName='" + collectionName + '\'' +
                '}';
    }

    /**
     * Builder for {@link ManualCompactParam} class.
     */
    public static final class Builder {
        private String collectionName;

        private Builder() {
        }

        /**
         * Sets the collection name. Collection name cannot be empty or null.
         *
         * @param collectionName collection name
         * @return Builder
         */
        public Builder withCollectionName(@NonNull String collectionName) {
            this.collectionName = collectionName;
            return this;
        }

        /**
         * Verifies parameters and creates a new {@link ManualCompactParam} instance.
         *
         * @return {@link ManualCompactParam}
         */
        public ManualCompactParam build() throws ParamException {
            ParamUtils.CheckNullEmptyString(collectionName, "Collection name");

            return new ManualCompactParam(this);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy