Class: ActiveRecord::ConnectionAdapters::RactorConnectionHandler::ProxyConnectionPool::State
Do not use. This class is for internal use only.
| Relationships & Source Files | |
| Inherits: | Object |
| Defined in: | activerecord/lib/active_record/connection_adapters/ractor_connection_handler/proxy_connection_pool.rb |
Class Method Summary
- .new ⇒ State constructor
Instance Attribute Summary
- #pinned_connection rw
- #pinned_depth rw
- #query_cache_version readonly
- #schema_cache rw
Instance Method Summary
Constructor Details
.new ⇒ State
# File 'activerecord/lib/active_record/connection_adapters/ractor_connection_handler/proxy_connection_pool.rb', line 343
def initialize @query_cache_version = Concurrent::AtomicFixnum.new @pinned_connection = nil @pinned_depth = 0 @async_executor_lock = Mutex.new @async_executor_built = false @async_executor = nil end
Instance Attribute Details
#pinned_connection (rw)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/ractor_connection_handler/proxy_connection_pool.rb', line 341
attr_accessor :pinned_connection, :pinned_depth, :schema_cache
#pinned_depth (rw)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/ractor_connection_handler/proxy_connection_pool.rb', line 341
attr_accessor :pinned_connection, :pinned_depth, :schema_cache
#query_cache_version (readonly)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/ractor_connection_handler/proxy_connection_pool.rb', line 340
attr_reader :query_cache_version
#schema_cache (rw)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/ractor_connection_handler/proxy_connection_pool.rb', line 341
attr_accessor :pinned_connection, :pinned_depth, :schema_cache
Instance Method Details
#async_executor(pool)
[ GitHub ]# File 'activerecord/lib/active_record/connection_adapters/ractor_connection_handler/proxy_connection_pool.rb', line 352
def async_executor(pool) @async_executor_lock.synchronize do unless @async_executor_built @async_executor_built = true @async_executor = pool.build_async_executor end @async_executor end end