Class: FreshConnection::AbstractConnectionManager
- Inherits:
-
Object
- Object
- FreshConnection::AbstractConnectionManager
- Defined in:
- lib/fresh_connection/abstract_connection_manager.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#replica_group ⇒ Object
readonly
Returns the value of attribute replica_group.
Class Method Summary collapse
Instance Method Summary collapse
- #clear_all_connections! ⇒ Object
-
#initialize(replica_group = "replica") ⇒ AbstractConnectionManager
constructor
A new instance of AbstractConnectionManager.
- #put_aside! ⇒ Object
- #recovery? ⇒ Boolean
- #replica_connection ⇒ Object
- #slave_group ⇒ Object
Constructor Details
#initialize(replica_group = "replica") ⇒ AbstractConnectionManager
Returns a new instance of AbstractConnectionManager.
17 18 19 20 21 |
# File 'lib/fresh_connection/abstract_connection_manager.rb', line 17 def initialize(replica_group = "replica") replica_group = "replica" if replica_group.to_s == "slave" @replica_group = replica_group.to_s @replica_group = "replica" if @replica_group.empty? end |
Instance Attribute Details
#replica_group ⇒ Object (readonly)
Returns the value of attribute replica_group.
15 16 17 |
# File 'lib/fresh_connection/abstract_connection_manager.rb', line 15 def replica_group @replica_group end |
Class Method Details
.method_added(name) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/fresh_connection/abstract_connection_manager.rb', line 6 def method_added(name) return unless name == :slave_connection ActiveSupport::Deprecation.warn( "'slave_connection' has been deprecated. use 'replica_connection' insted." ) end |
Instance Method Details
#clear_all_connections! ⇒ Object
35 36 |
# File 'lib/fresh_connection/abstract_connection_manager.rb', line 35 def clear_all_connections! end |
#put_aside! ⇒ Object
39 40 |
# File 'lib/fresh_connection/abstract_connection_manager.rb', line 39 def put_aside! end |
#recovery? ⇒ Boolean
43 44 |
# File 'lib/fresh_connection/abstract_connection_manager.rb', line 43 def recovery? end |
#replica_connection ⇒ Object
31 32 |
# File 'lib/fresh_connection/abstract_connection_manager.rb', line 31 def replica_connection end |
#slave_group ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/fresh_connection/abstract_connection_manager.rb', line 23 def slave_group ActiveSupport::Deprecation.warn( "'slave_group' is deprecated and will removed from version 2.4.0. use 'replica_group' insted." ) replica_group end |