Class MultiConnectParam.Builder

    • 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 value
        timeUnit - 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 value
        timeUnit - 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 value
        timeUnit - 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 value
        timeUnit - 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 user
        password - password
        Returns:
        Builder