public static class ServerAddress.Builder extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
ServerAddress |
build()
Verifies parameters and creates a new
ServerAddress instance. |
ServerAddress.Builder |
withHealthPort(int port)
Sets the cluster health port.
|
ServerAddress.Builder |
withHost(@NonNull String host)
Sets the host name/address.
|
ServerAddress.Builder |
withPort(int port)
Sets the connection port.
|
public ServerAddress.Builder withHost(@NonNull @NonNull String host)
host - host name/addressBuilderpublic ServerAddress.Builder withPort(int port)
port - port valueBuilderpublic ServerAddress.Builder withHealthPort(int port)
port - port valueBuilderpublic ServerAddress build() throws ParamException
ServerAddress instance.ServerAddressParamExceptionCopyright © 2023. All rights reserved.