Class: DatabaseSlave::RuntimeRegistry

Inherits:
Object
  • Object
show all
Extended by:
ActiveSupport::PerThreadRegistry
Defined in:
lib/database_slave/runtime_registry.rb

Overview

This is a thread locals registry for Active Record. For example:

ActiveRecord::RuntimeRegistry.connection_handler

returns the connection handler local to the current thread.

See the documentation of ActiveSupport::PerThreadRegistry for further details. 该类定义拷贝自Rails 4.0.0 的 lib/active_record/runtime_registry.rb 因为Rails 3.x 没有该文件.

Instance Attribute Summary collapse

Instance Attribute Details

#current_slave_nameObject

Returns the value of attribute current_slave_name.



38
39
40
# File 'lib/database_slave/runtime_registry.rb', line 38

def current_slave_name
  @current_slave_name
end