Package io.milvus.param.collection
Class CreateDatabaseParam.Builder
- java.lang.Object
-
- io.milvus.param.collection.CreateDatabaseParam.Builder
-
- Enclosing class:
- CreateDatabaseParam
public static final class CreateDatabaseParam.Builder extends Object
Builder forCreateDatabaseParamclass.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CreateDatabaseParambuild()Verifies parameters and creates a newCreateDatabaseParaminstance.CreateDatabaseParam.BuilderwithDatabaseName(String databaseName)Sets the database name.CreateDatabaseParam.BuilderwithProperty(String key, String value)Basic method to set a key-value property.CreateDatabaseParam.BuilderwithReplicaNumber(int replicaNumber)Sets the replica number in database level, then if load collection doesn't have replica number, it will use this replica number.CreateDatabaseParam.BuilderwithResourceGroups(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 Detail
-
withDatabaseName
public CreateDatabaseParam.Builder withDatabaseName(String databaseName)
Sets the database name. Database name cannot be empty or null.- Parameters:
databaseName- database name- Returns:
Builder
-
withReplicaNumber
public CreateDatabaseParam.Builder 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.- Parameters:
replicaNumber- replica number- Returns:
Builder
-
withResourceGroups
public CreateDatabaseParam.Builder withResourceGroups(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(String key, String value)
Basic method to set a key-value property.- Parameters:
key- the keyvalue- the value- Returns:
Builder
-
build
public CreateDatabaseParam build() throws ParamException
Verifies parameters and creates a newCreateDatabaseParaminstance.- Returns:
CreateDatabaseParam- Throws:
ParamException
-
-