io.milvus.param.control

## Class LoadBalanceParam.Builder

- java.lang.Object
- - io.milvus.param.control.LoadBalanceParam.Builder

- Enclosing class:
    LoadBalanceParam

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

  Builder for `LoadBalanceParam` class.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `LoadBalanceParam.Builder` | `addDestinationNodeID(@NonNull java.lang.Long destNodeID)` Adds the destination query node by ID to which the sealed segments will be balanced.
    `LoadBalanceParam.Builder` | `addSegmentID(@NonNull java.lang.Long segmentID)` Adds a sealed segments by ID to be balanced.
    `LoadBalanceParam` | `build()` Verifies parameters and creates a new `LoadBalanceParam` instance.
    `LoadBalanceParam.Builder` | `withCollectionName(@NonNull java.lang.String collectionName)` Sets the collection name.
    `LoadBalanceParam.Builder` | `withDatabaseName(java.lang.String databaseName)` Sets the database name.
    `LoadBalanceParam.Builder` | `withDestinationNodeID(@NonNull java.util.List<java.lang.Long> destNodeIDs)` Sets the destination query node by ID array to which the sealed segments will be balance.
    `LoadBalanceParam.Builder` | `withSegmentIDs(@NonNull java.util.List<java.lang.Long> segmentIDs)` Sets a sealed segments by ID array to be balanced.
    `LoadBalanceParam.Builder` | `withSourceNodeID(@NonNull java.lang.Long srcNodeID)` Sets the source query node by ID in which the sealed segments were loaded.

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

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

- - ### Method Detail

    - #### withDatabaseName

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

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

    - #### withCollectionName

          public LoadBalanceParam.Builder withCollectionName(@NonNull
                                                             @NonNull java.lang.String collectionName)

      Sets the collection name. Collection name cannot be empty or null.
      Parameters:
        `collectionName` - collection name
      Returns:
        `Builder`

    - #### withSourceNodeID

          public LoadBalanceParam.Builder withSourceNodeID(@NonNull
                                                           @NonNull java.lang.Long srcNodeID)

      Sets the source query node by ID in which the sealed segments were loaded.
      Parameters:
        `srcNodeID` - source query node id
      Returns:
        `Builder`

    - #### addDestinationNodeID

          public LoadBalanceParam.Builder addDestinationNodeID(@NonNull
                                                               @NonNull java.lang.Long destNodeID)

      Adds the destination query node by ID to which the sealed segments will be balanced.
      Parameters:
        `destNodeID` - destination query node id
      Returns:
        `Builder`

    - #### withDestinationNodeID

          public LoadBalanceParam.Builder withDestinationNodeID(@NonNull
                                                                @NonNull java.util.List<java.lang.Long> destNodeIDs)

      Sets the destination query node by ID array to which the sealed segments will be balance.
      Parameters:
        `destNodeIDs` - destination query node id array
      Returns:
        `Builder`

    - #### addSegmentID

          public LoadBalanceParam.Builder addSegmentID(@NonNull
                                                       @NonNull java.lang.Long segmentID)

      Adds a sealed segments by ID to be balanced.
      Parameters:
        `segmentID` - sealed segment id
      Returns:
        `Builder`

    - #### withSegmentIDs

          public LoadBalanceParam.Builder withSegmentIDs(@NonNull
                                                         @NonNull java.util.List<java.lang.Long> segmentIDs)

      Sets a sealed segments by ID array to be balanced.
      Parameters:
        `segmentIDs` - sealed segments id array
      Returns:
        `Builder`

    - #### build

          public LoadBalanceParam build()
                                 throws ParamException

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