Package io.milvus.param.collection
Class AlterCollectionParam.Builder
java.lang.Object
io.milvus.param.collection.AlterCollectionParam.Builder
- Enclosing class:
AlterCollectionParam
Builder for
AlterCollectionParam class.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Verifies parameters and creates a newAlterCollectionParaminstance.withCollectionName(@NonNull String collectionName) Set the collection name.withDatabaseName(String databaseName) Sets the database name.withMMapEnabled(boolean enabledMMap) Enable MMap or not for index data files.withProperty(@NonNull String key, @NonNull String value) Basic method to set a key-value property.Collection time to live (TTL) is the expiration time of data in a collection.
-
Method Details
-
withCollectionName
Set the collection name. Collection name cannot be empty or null.- Parameters:
collectionName- collection name- Returns:
Builder
-
withDatabaseName
Sets the database name. database name can be nil.- Parameters:
databaseName- database name- Returns:
Builder
-
withTTL
Collection time to live (TTL) is the expiration time of data in a collection. Expired data in the collection will be cleaned up and will not be involved in searches or queries. In server side, the default value is 0, which means TTL is disabled. Specify TTL in the unit of seconds.- Parameters:
ttlSeconds- TTL seconds, value should be 0 or greater- Returns:
Builder
-
withMMapEnabled
Enable MMap or not for index data files.- Parameters:
enabledMMap- enabled or not- Returns:
Builder
-
withProperty
public AlterCollectionParam.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 newAlterCollectionParaminstance.- Returns:
AlterCollectionParam- Throws:
ParamException
-