Class ConnectionProfile.Builder

    • Constructor Detail

      • Builder

        public Builder()
        create an empty builder
      • Builder

        public Builder​(ConnectionProfile source)
        copy constructor, using another profile as a base
    • Method Detail

      • setConnectTimeout

        public void setConnectTimeout​(TimeValue connectTimeout)
        Sets a connect timeout for this connection profile
      • setHandshakeTimeout

        public void setHandshakeTimeout​(TimeValue handshakeTimeout)
        Sets a handshake timeout for this connection profile
      • addConnections

        public void addConnections​(int numConnections,
                                   TransportRequestOptions.Type... types)
        Adds a number of connections for one or more types. Each type can only be added once.
        Parameters:
        numConnections - the number of connections to use in the pool for the given connection types
        types - a set of types that should share the given number of connections