Package io.milvus.param
Class MultiConnectParam.Builder
java.lang.Object
io.milvus.param.ConnectParam.Builder
io.milvus.param.MultiConnectParam.Builder
- Enclosing class:
MultiConnectParam
Builder for
MultiConnectParam-
Field Summary
Fields inherited from class io.milvus.param.ConnectParam.Builder
secure -
Method Summary
Modifier and TypeMethodDescriptionbuild()Verifies parameters and creates a newMultiConnectParaminstance.keepAliveWithoutCalls(boolean enable) Enables the keep-alive function for client channel.withAuthorization(@NonNull String authorization) Sets the secure for this connectionwithAuthorization(String username, String password) Sets the username and password for this connectionwithCaPemPath(@NonNull String caPemPath) Set the ca.pem path for tls two-way authentication, only takes effect when "secure" is True.withClientKeyPath(@NonNull String clientKeyPath) Set the client.key path for tls two-way authentication, only takes effect when "secure" is True.withClientPemPath(@NonNull String clientPemPath) Set the client.pem path for tls two-way authentication, only takes effect when "secure" is True.withConnectTimeout(long connectTimeout, @NonNull TimeUnit timeUnit) Sets the connection timeout value of client channel.withDatabaseName(String databaseName) Sets the database name.Sets the host name/address.withHosts(@NonNull List<ServerAddress> hosts) Sets the addresses.withIdleTimeout(long idleTimeout, @NonNull TimeUnit timeUnit) Sets the idle timeout value of client channel.withKeepAliveTime(long keepAliveTime, @NonNull TimeUnit timeUnit) Sets the keep-alive time value of client channel.withKeepAliveTimeout(long keepAliveTimeout, @NonNull TimeUnit timeUnit) Sets the keep-alive timeout value of client channel.withPort(int port) Sets the connection port.withQueryNodeSingleSearch(@NonNull QueryNodeSingleSearch queryNodeSingleSearch) Sets single search for query node listener.withRpcDeadline(long deadline, @NonNull TimeUnit timeUnit) Set a deadline for how long you are willing to wait for a reply from the server.withSecure(boolean secure) Sets secure the authorization for this connection, set to True to enable TLSwithServerName(@NonNull String serverName) Set target name override for SSL host name checking, only takes effect when "secure" is True.withServerPemPath(@NonNull String serverPemPath) Set the server.pem path for tls two-way authentication, only takes effect when "secure" is True.Sets the tokenSets the uriMethods inherited from class io.milvus.param.ConnectParam.Builder
secure, verify, withClientRequestId
-
Method Details
-
withHosts
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
-
withHost
Sets the host name/address.- Overrides:
withHostin classConnectParam.Builder- Parameters:
host- host name/address- Returns:
Builder
-
withPort
Sets the connection port. Port value must be greater than zero and less than 65536.- Overrides:
withPortin classConnectParam.Builder- Parameters:
port- port value- Returns:
Builder
-
withDatabaseName
Sets the database name.- Overrides:
withDatabaseNamein classConnectParam.Builder- Parameters:
databaseName- databaseName- Returns:
Builder
-
withUri
Sets the uri- Overrides:
withUriin classConnectParam.Builder- Parameters:
uri- the uri of Milvus instance- Returns:
Builder
-
withToken
Sets the token- Overrides:
withTokenin classConnectParam.Builder- Parameters:
token- serving as the key for identification and authentication purposes.- Returns:
Builder
-
withConnectTimeout
public MultiConnectParam.Builder withConnectTimeout(long connectTimeout, @NonNull @NonNull TimeUnit timeUnit) Sets the connection timeout value of client channel. The timeout value must be greater than zero.- Overrides:
withConnectTimeoutin classConnectParam.Builder- Parameters:
connectTimeout- timeout valuetimeUnit- timeout unit- Returns:
Builder
-
withKeepAliveTime
public MultiConnectParam.Builder withKeepAliveTime(long keepAliveTime, @NonNull @NonNull TimeUnit timeUnit) Sets the keep-alive time value of client channel. The keep-alive value must be greater than zero.- Overrides:
withKeepAliveTimein classConnectParam.Builder- Parameters:
keepAliveTime- keep-alive valuetimeUnit- keep-alive unit- Returns:
Builder
-
withKeepAliveTimeout
public MultiConnectParam.Builder withKeepAliveTimeout(long keepAliveTimeout, @NonNull @NonNull TimeUnit timeUnit) Sets the keep-alive timeout value of client channel. The timeout value must be greater than zero.- Overrides:
withKeepAliveTimeoutin classConnectParam.Builder- Parameters:
keepAliveTimeout- timeout valuetimeUnit- timeout unit- Returns:
Builder
-
keepAliveWithoutCalls
Enables the keep-alive function for client channel.- Overrides:
keepAliveWithoutCallsin classConnectParam.Builder- Parameters:
enable- true keep-alive- Returns:
Builder
-
withIdleTimeout
public MultiConnectParam.Builder withIdleTimeout(long idleTimeout, @NonNull @NonNull TimeUnit timeUnit) Sets the idle timeout value of client channel. The timeout value must be larger than zero.- Overrides:
withIdleTimeoutin classConnectParam.Builder- Parameters:
idleTimeout- timeout valuetimeUnit- timeout unit- Returns:
Builder
-
withRpcDeadline
public MultiConnectParam.Builder withRpcDeadline(long deadline, @NonNull @NonNull TimeUnit timeUnit) Set a deadline for how long you are willing to wait for a reply from the server. With a deadline setting, the client will wait when encounter fast RPC fail caused by network fluctuations. The deadline value must be larger than or equal to zero. Default value is 0, deadline is disabled.- Overrides:
withRpcDeadlinein classConnectParam.Builder- Parameters:
deadline- deadline valuetimeUnit- deadline unit- Returns:
Builder
-
withAuthorization
Sets the username and password for this connection- Overrides:
withAuthorizationin classConnectParam.Builder- Parameters:
username- current userpassword- password- Returns:
Builder
-
withSecure
Sets secure the authorization for this connection, set to True to enable TLS- Overrides:
withSecurein classConnectParam.Builder- Parameters:
secure- boolean- Returns:
Builder
-
withAuthorization
Sets the secure for this connection- Overrides:
withAuthorizationin classConnectParam.Builder- Parameters:
authorization- the authorization info that has included the encoded username and password info- Returns:
Builder
-
withClientKeyPath
Set the client.key path for tls two-way authentication, only takes effect when "secure" is True.- Overrides:
withClientKeyPathin classConnectParam.Builder- Parameters:
clientKeyPath- path of client.key- Returns:
Builder
-
withClientPemPath
Set the client.pem path for tls two-way authentication, only takes effect when "secure" is True.- Overrides:
withClientPemPathin classConnectParam.Builder- Parameters:
clientPemPath- path of client.pem- Returns:
Builder
-
withCaPemPath
Set the ca.pem path for tls two-way authentication, only takes effect when "secure" is True.- Overrides:
withCaPemPathin classConnectParam.Builder- Parameters:
caPemPath- path of ca.pem- Returns:
Builder
-
withServerPemPath
Set the server.pem path for tls two-way authentication, only takes effect when "secure" is True.- Overrides:
withServerPemPathin classConnectParam.Builder- Parameters:
serverPemPath- path of server.pem- Returns:
Builder
-
withServerName
Set target name override for SSL host name checking, only takes effect when "secure" is True. Note: this value is passed to grpc.ssl_target_name_override- Overrides:
withServerNamein classConnectParam.Builder- Parameters:
serverName- path of server.pem- Returns:
Builder
-
build
Verifies parameters and creates a newMultiConnectParaminstance.- Overrides:
buildin classConnectParam.Builder- Returns:
MultiConnectParam- Throws:
ParamException
-