io.milvus.param.collection

## Class FlushParam.Builder

- java.lang.Object
- - io.milvus.param.collection.FlushParam.Builder

- Enclosing class:
    FlushParam

      public static final class FlushParam.Builder
      extends java.lang.Object

  Builder for `FlushParam` class.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FlushParam.Builder` | `addCollectionName(@NonNull java.lang.String collectionName)` Adds a collection to be flushed.
    `FlushParam` | `build()` Verifies parameters and creates a new `FlushParam` instance.
    `FlushParam.Builder` | `withCollectionNames(@NonNull java.util.List<java.lang.String> collectionNames)` Sets a list of collections to be flushed.
    `FlushParam.Builder` | `withDatabaseName(java.lang.String databaseName)` Sets the database name.
    `FlushParam.Builder` | `withSyncFlush(@NonNull java.lang.Boolean syncFlush)` Sets the flush function to sync mode.
    `FlushParam.Builder` | `withSyncFlushWaitingInterval(@NonNull java.lang.Long milliseconds)` Sets waiting interval in sync mode.
    `FlushParam.Builder` | `withSyncFlushWaitingTimeout(@NonNull java.lang.Long seconds)` Sets timeout value for sync mode.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### withDatabaseName

          public FlushParam.Builder withDatabaseName(java.lang.String databaseName)

      Sets the database name. database name can be nil.
      Parameters:
        `databaseName` - database name
      Returns:
        `Builder`

    - #### withCollectionNames

          public FlushParam.Builder withCollectionNames(@NonNull
                                                        @NonNull java.util.List<java.lang.String> collectionNames)

      Sets a list of collections to be flushed.
      Parameters:
        `collectionNames` - a list of collections
      Returns:
        `Builder`

    - #### addCollectionName

          public FlushParam.Builder addCollectionName(@NonNull
                                                      @NonNull java.lang.String collectionName)

      Adds a collection to be flushed.
      Parameters:
        `collectionName` - name of the collections
      Returns:
        `Builder`

    - #### withSyncFlush

          public FlushParam.Builder withSyncFlush(@NonNull
                                                  @NonNull java.lang.Boolean syncFlush)

      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.TRUE` is sync mode, `Boolean.FALSE` is not
      Returns:
        `Builder`

    - #### withSyncFlushWaitingInterval

          public FlushParam.Builder withSyncFlushWaitingInterval(@NonNull
                                                                 @NonNull java.lang.Long milliseconds)

      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:
        `Constant`

    - #### withSyncFlushWaitingTimeout

          public FlushParam.Builder withSyncFlushWaitingTimeout(@NonNull
                                                                @NonNull java.lang.Long seconds)

      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:
        `Constant`

    - #### build

          public FlushParam build()
                           throws ParamException

      Verifies parameters and creates a new `FlushParam` instance.
      Returns:
        `FlushParam`
      Throws:
        `ParamException`