Module: OpenSearch::Transport::Transport::Connections::Selector::Base Abstract
- Included in:
- Random, RoundRobin
- Defined in:
- lib/opensearch/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
#connections ⇒ Object (readonly)
Returns the value of attribute connections.
35 36 37 |
# File 'lib/opensearch/transport/transport/connections/selector.rb', line 35 def connections @connections end |
Instance Method Details
#initialize(arguments = {}) ⇒ Object
39 40 41 |
# File 'lib/opensearch/transport/transport/connections/selector.rb', line 39 def initialize(arguments = {}) @connections = arguments[:connections] end |
#select(_options = {}) ⇒ Connection
This method is abstract.
Selector strategies implement this method to select and return a connection from the pool.
48 49 50 |
# File 'lib/opensearch/transport/transport/connections/selector.rb', line 48 def select( = {}) raise NoMethodError, "Implement this method in the selector implementation." end |