Package io.milvus.param
Class ServerAddress.Builder
- java.lang.Object
-
- io.milvus.param.ServerAddress.Builder
-
- Enclosing class:
- ServerAddress
public static class ServerAddress.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerAddress
build()
Verifies parameters and creates a newServerAddress
instance.ServerAddress.Builder
withHealthPort(int port)
Sets the cluster health port.ServerAddress.Builder
withHost(@NonNull java.lang.String host)
Sets the host name/address.ServerAddress.Builder
withPort(int port)
Sets the connection port.
-
-
-
Method Detail
-
withHost
public ServerAddress.Builder withHost(@NonNull @NonNull java.lang.String host)
Sets the host name/address.- Parameters:
host
- host name/address- Returns:
Builder
-
withPort
public ServerAddress.Builder withPort(int port)
Sets the connection port. Port value must be greater than zero and less than 65536.- Parameters:
port
- port value- Returns:
Builder
-
withHealthPort
public ServerAddress.Builder withHealthPort(int port)
Sets the cluster health port. Port value must be greater than zero and less than 65536.- Parameters:
port
- port value- Returns:
Builder
-
build
public ServerAddress build() throws ParamException
Verifies parameters and creates a newServerAddress
instance.- Returns:
ServerAddress
- Throws:
ParamException
-
-