Method: Mongo::Server::ConnectionPool#size

Defined in:
lib/mongo/server/connection_pool.rb

#sizeInteger

Size of the connection pool.

Includes available and checked out connections.

Returns:

  • (Integer)

    Size of the connection pool.

Since:

  • 2.9.0



261
262
263
264
265
266
267
# File 'lib/mongo/server/connection_pool.rb', line 261

def size
  raise_if_closed!

  @lock.synchronize do
    unsynchronized_size
  end
end