Module: Elasticsearch::Transport::Transport::Connections::Selector::Base Abstract
- Included in:
- Random, RoundRobin
- Defined in:
- lib/elasticsearch/transport/transport/connections/selector.rb
Overview
This module is abstract.
Common functionality for connection selector implementations.
Instance Attribute Summary collapse
-
#connections ⇒ Object
readonly
Returns the value of attribute connections.
Instance Method Summary collapse
Instance Attribute Details
permalink #connections ⇒ Object (readonly)
Returns the value of attribute connections.
10 11 12 |
# File 'lib/elasticsearch/transport/transport/connections/selector.rb', line 10 def connections @connections end |
Instance Method Details
permalink #initialize(arguments = {}) ⇒ Object
14 15 16 |
# File 'lib/elasticsearch/transport/transport/connections/selector.rb', line 14 def initialize(arguments={}) @connections = arguments[:connections] end |
permalink #select(options = {}) ⇒ Connection
This method is abstract.
Selector strategies implement this method to select and return a connection from the pool.
23 24 25 |
# File 'lib/elasticsearch/transport/transport/connections/selector.rb', line 23 def select(={}) raise NoMethodError, "Implement this method in the selector implementation." end |