Class: ActiveRecord::ConnectionAdapters::ConnectionPool::Lease
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb |
Class Method Summary
- .new ⇒ Lease constructor
Instance Attribute Summary
- #connection rw
- #sticky rw
Instance Method Summary
Constructor Details
.new ⇒ Lease
# File 'activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb', line 144
def initialize @connection = nil @sticky = nil end
Instance Attribute Details
#connection (rw)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb', line 142
attr_accessor :connection, :sticky
#sticky (rw)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb', line 142
attr_accessor :connection, :sticky
Instance Method Details
#clear(connection)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb', line 156
def clear(connection) if @connection == connection @connection = nil @sticky = nil true else false end end
#release
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb', line 149
def release conn = @connection @connection = nil @sticky = nil conn end