vendor/bundle/jruby/2.3.0/gems/elasticsearch-transport-5.0.4/lib/elasticsearch/transport/transport/base.rb
# Builds and returns a collection of connections
#
# The adapters have to implement the {Base#__build_connection} method.
#
# @return [Connections::Collection]
# @api    private
#
Builds and returns a collection of connections
The adapters have to implement the {Base#__build_connection} method.
Builds and returns a collection of connections The adapters have to implement the { Base#__build_connection } method .
def __build_connections
          Connections::Collection.new \
            :connections => hosts.map { |host|
              host[:protocol] = host[:scheme] || options[:scheme] || options[:http][:scheme] || DEFAULT_PROTOCOL
              host[:port] ||= options[:port] || options[:http][:scheme] || DEFAULT_PORT
              if (options[:user] || options[:http][:user]) && !host[:user]
                host[:user] ||= options[:user] || options[:http][:user]
                host[:password] ||= options[:password] || options[:http][:password]
              end
              __build_connection(host, (options[:transport_options] || {}), @block)
            },
            :selector_class => options[:selector_class],
            :selector => options[:selector]
        end
def __build_connections Connections :: Collection . new :connections => hosts . map { | host | host [ :protocol ] = host [ :scheme ] || options [ :scheme ] || options [ :http ] [ :scheme ] || DEFAULT_PROTOCOL host [ :port ] ||= options [ :port ] || options [ :http ] [ :scheme ] || DEFAULT_PORT if ( options [ :user ] || options [ :http ] [ :user ] ) && ! host [ :user ] host [ :user ] ||= options [ :user ] || options [ :http ] [ :user ] host [ :password ] ||= options [ :password ] || options [ :http ] [ :password ] end __build_connection ( host , ( options [ :transport_options ] || { } ) , @block ) } , :selector_class => options [ :selector_class ] , :selector => options [ :selector ] end
Builds and returns a collection of connections
The adapters have to implement the {Base#__build_connection} method.
Builds and returns a collection of connections The adapters have to implement the { Base#__build_connection } method .
None
Connections::Collection
api
None