io.milvus.param.control.ManualCompactParam Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of milvus-sdk-java Show documentation
Show all versions of milvus-sdk-java Show documentation
Java SDK for Milvus, a distributed high-performance vector search engine.
update grpc to 1.42.1
update protobuf to 3.19.1
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);
}
}
}