123456789_123456789_123456789_123456789_123456789_

Class: ActiveRecord::ConnectionAdapters::ConnectionPool::LeaseRegistry

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ::ActiveSupport::WeakKeyMap, ObjectSpace::WeakKeyMap
Instance Chain:
self, ::ActiveSupport::WeakKeyMap, ObjectSpace::WeakKeyMap
Inherits: ActiveSupport::WeakKeyMap
Defined in: activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb

Class Method Summary

Instance Method Summary

::ActiveSupport::WeakKeyMap - Inherited

#[], #[]=, #clear, #delete,
#fetch_or_store

Returns the cached value, computing and storing it when nil.

Constructor Details

This class inherits a constructor from ActiveSupport::WeakKeyMap

Instance Method Details

#lease(context)

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb', line 203

def lease(context)
  fetch_or_store(context) { Lease.new }
end