Package io.milvus.param.collection
Class FlushParam.Builder
java.lang.Object
io.milvus.param.collection.FlushParam.Builder
- Enclosing class:
FlushParam
Builder for
FlushParam class.-
Method Summary
Modifier and TypeMethodDescriptionaddCollectionName(@NonNull String collectionName) Adds a collection to be flushed.build()Verifies parameters and creates a newFlushParaminstance.withCollectionNames(@NonNull List<String> collectionNames) Sets a list of collections to be flushed.withDatabaseName(String databaseName) Sets the database name.withSyncFlush(@NonNull Boolean syncFlush) Sets the flush function to sync mode.withSyncFlushWaitingInterval(@NonNull Long milliseconds) Sets waiting interval in sync mode.withSyncFlushWaitingTimeout(@NonNull Long seconds) Sets timeout value for sync mode.
-
Method Details
-
withDatabaseName
Sets the database name. database name can be nil.- Parameters:
databaseName- database name- Returns:
Builder
-
withCollectionNames
Sets a list of collections to be flushed.- Parameters:
collectionNames- a list of collections- Returns:
Builder
-
addCollectionName
Adds a collection to be flushed.- Parameters:
collectionName- name of the collections- Returns:
Builder
-
withSyncFlush
Sets the flush function to sync mode. With sync mode enabled, the client keeps waiting until all segments of the collection successfully flushed. If sync mode disabled, client returns at once after the flush() is called.- Parameters:
syncFlush-Boolean.TRUEis sync mode,Boolean.FALSEis not- Returns:
Builder
-
withSyncFlushWaitingInterval
Sets waiting interval in sync mode. With sync mode enabled, the client will constantly check segments state by interval. Interval must be greater than zero, and cannot be greater than Constant.MAX_WAITING_FLUSHING_INTERVAL.- Parameters:
milliseconds- interval- Returns:
Builder- See Also:
-
withSyncFlushWaitingTimeout
Sets timeout value for sync mode. Timeout value must be greater than zero, and cannot be greater than Constant.MAX_WAITING_FLUSHING_TIMEOUT.- Parameters:
seconds- time out value for sync mode- Returns:
Builder- See Also:
-
build
Verifies parameters and creates a newFlushParaminstance.- Returns:
FlushParam- Throws:
ParamException
-