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 database.
package io.milvus.param.control;
import io.milvus.exception.ParamException;
import io.milvus.param.ParamUtils;
import lombok.Getter;
import lombok.NonNull;
import lombok.ToString;
/**
* Parameters for manualCompact
interface.
*
* @see Compaction function design
*/
@Getter
@ToString
public class ManualCompactParam {
private final String collectionName;
private ManualCompactParam(@NonNull Builder builder) {
this.collectionName = builder.collectionName;
}
public static Builder newBuilder() {
return new Builder();
}
/**
* 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);
}
}
}