Package io.milvus.param
Class MultiConnectParam.Builder
- java.lang.Object
-
- io.milvus.param.MultiConnectParam.Builder
-
- Enclosing class:
- MultiConnectParam
public static class MultiConnectParam.Builder extends java.lang.Object
Builder forMultiConnectParam
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiConnectParam
build()
Verifies parameters and creates a newMultiConnectParam
instance.MultiConnectParam.Builder
keepAliveWithoutCalls(boolean enable)
Enables the keep-alive function for client channel.MultiConnectParam.Builder
secure(boolean enable)
Enables the secure for client channel.MultiConnectParam.Builder
withAuthorization(@NonNull java.lang.String username, @NonNull java.lang.String password)
Sets the username and password for this connectionMultiConnectParam.Builder
withConnectTimeout(long connectTimeout, @NonNull java.util.concurrent.TimeUnit timeUnit)
Sets the connection timeout value of client channel.MultiConnectParam.Builder
withHosts(@NonNull java.util.List<ServerAddress> hosts)
Sets the addresses.MultiConnectParam.Builder
withIdleTimeout(long idleTimeout, @NonNull java.util.concurrent.TimeUnit timeUnit)
Sets the idle timeout value of client channel.MultiConnectParam.Builder
withKeepAliveTime(long keepAliveTime, @NonNull java.util.concurrent.TimeUnit timeUnit)
Sets the keep-alive time value of client channel.MultiConnectParam.Builder
withKeepAliveTimeout(long keepAliveTimeout, @NonNull java.util.concurrent.TimeUnit timeUnit)
Sets the keep-alive timeout value of client channel.MultiConnectParam.Builder
withQueryNodeSingleSearch(@NonNull QueryNodeSingleSearch queryNodeSingleSearch)
Sets single search for query node listener.MultiConnectParam.Builder
withSecure(boolean secure)
Sets secure the authorization for this connection
-
-
-
Method Detail
-
withHosts
public MultiConnectParam.Builder withHosts(@NonNull @NonNull java.util.List<ServerAddress> hosts)
Sets the addresses.- Parameters:
hosts
- hosts serverAddresses- Returns:
Builder
-
withQueryNodeSingleSearch
public MultiConnectParam.Builder withQueryNodeSingleSearch(@NonNull @NonNull QueryNodeSingleSearch queryNodeSingleSearch)
Sets single search for query node listener.- Parameters:
queryNodeSingleSearch
- query node single search for listener- Returns:
Builder
-
withConnectTimeout
public MultiConnectParam.Builder withConnectTimeout(long connectTimeout, @NonNull @NonNull java.util.concurrent.TimeUnit timeUnit)
Sets the connection timeout value of client channel. The timeout value must be greater than zero.- Parameters:
connectTimeout
- timeout valuetimeUnit
- timeout unit- Returns:
Builder
-
withKeepAliveTime
public MultiConnectParam.Builder withKeepAliveTime(long keepAliveTime, @NonNull @NonNull java.util.concurrent.TimeUnit timeUnit)
Sets the keep-alive time value of client channel. The keep-alive value must be greater than zero.- Parameters:
keepAliveTime
- keep-alive valuetimeUnit
- keep-alive unit- Returns:
Builder
-
withKeepAliveTimeout
public MultiConnectParam.Builder withKeepAliveTimeout(long keepAliveTimeout, @NonNull @NonNull java.util.concurrent.TimeUnit timeUnit)
Sets the keep-alive timeout value of client channel. The timeout value must be greater than zero.- Parameters:
keepAliveTimeout
- timeout valuetimeUnit
- timeout unit- Returns:
Builder
-
keepAliveWithoutCalls
public MultiConnectParam.Builder keepAliveWithoutCalls(boolean enable)
Enables the keep-alive function for client channel.- Parameters:
enable
- true keep-alive- Returns:
Builder
-
secure
public MultiConnectParam.Builder secure(boolean enable)
Enables the secure for client channel.- Parameters:
enable
- true keep-alive- Returns:
Builder
-
withSecure
public MultiConnectParam.Builder withSecure(boolean secure)
Sets secure the authorization for this connection- Parameters:
secure
- boolean- Returns:
Builder
-
withIdleTimeout
public MultiConnectParam.Builder withIdleTimeout(long idleTimeout, @NonNull @NonNull java.util.concurrent.TimeUnit timeUnit)
Sets the idle timeout value of client channel. The timeout value must be larger than zero.- Parameters:
idleTimeout
- timeout valuetimeUnit
- timeout unit- Returns:
Builder
-
withAuthorization
public MultiConnectParam.Builder withAuthorization(@NonNull @NonNull java.lang.String username, @NonNull @NonNull java.lang.String password)
Sets the username and password for this connection- Parameters:
username
- current userpassword
- password- Returns:
Builder
-
build
public MultiConnectParam build() throws ParamException
Verifies parameters and creates a newMultiConnectParam
instance.- Returns:
MultiConnectParam
- Throws:
ParamException
-
-