Method: Mongo::Server::ConnectionPool::GenerationManager#initialize

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

#initialize(server:) ⇒ GenerationManager

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.

Returns a new instance of GenerationManager.

Since:

  • 2.0.0, largely rewritten in 2.9.0



25
26
27
28
29
# File 'lib/mongo/server/connection_pool/generation_manager.rb', line 25

def initialize(server:)
  @map = Hash.new { |hash, key| hash[key] = 1 }
  @server = server
  @lock = Mutex.new
end