Class: Mooncell::ConnectionPool Private

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Enumerable
Defined in:
lib/mooncell/connection_pool.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

The connection pool

Since:

  • 0.1.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConnectionPool

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Create a new connection pool

Since:

  • 0.1.0



25
26
27
# File 'lib/mooncell/connection_pool.rb', line 25

def initialize
  @connections = Concurrent::Set.new
end

Instance Attribute Details

#connectionsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.1.0



19
20
21
# File 'lib/mooncell/connection_pool.rb', line 19

def connections
  @connections
end

Instance Method Details

#each(&block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Iterate connections

Parameters:

  • block (Proc)

    the iterate block

Since:

  • 0.1.0



35
36
37
# File 'lib/mooncell/connection_pool.rb', line 35

def each(&block)
  @connections.each(&block)
end