Package io.milvus.param.collection
Class CreateDatabaseParam.Builder
java.lang.Object
io.milvus.param.collection.CreateDatabaseParam.Builder
- Enclosing class:
CreateDatabaseParam
Builder for
CreateDatabaseParam class.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Verifies parameters and creates a newCreateDatabaseParaminstance.withDatabaseName(@NonNull String databaseName) Sets the database name.withProperty(@NonNull String key, @NonNull String value) Basic method to set a key-value property.withReplicaNumber(int replicaNumber) Sets the replica number in database level, then if load collection doesn't have replica number, it will use this replica number.withResourceGroups(@NonNull List<String> resourceGroups) Sets the resource groups in database level, then if load collection doesn't have resource groups, it will use this resource groups.
-
Method Details
-
withDatabaseName
Sets the database name. Database name cannot be empty or null.- Parameters:
databaseName- database name- Returns:
Builder
-
withReplicaNumber
Sets the replica number in database level, then if load collection doesn't have replica number, it will use this replica number.- Parameters:
replicaNumber- replica number- Returns:
Builder
-
withResourceGroups
public CreateDatabaseParam.Builder withResourceGroups(@NonNull @NonNull List<String> resourceGroups) Sets the resource groups in database level, then if load collection doesn't have resource groups, it will use this resource groups.- Parameters:
resourceGroups- resource group names- Returns:
Builder
-
withProperty
public CreateDatabaseParam.Builder withProperty(@NonNull @NonNull String key, @NonNull @NonNull String value) Basic method to set a key-value property.- Parameters:
key- the keyvalue- the value- Returns:
Builder
-
build
Verifies parameters and creates a newCreateDatabaseParaminstance.- Returns:
CreateDatabaseParam- Throws:
ParamException
-