class Simple::Sharding::ConnectionHandler::ConnectionPoolOwner
Connection pool need a class to own each connection
Attributes
name[R]
Public Class Methods
new(name)
click to toggle source
# File lib/simple/sharding/connection_handler.rb, line 55 def initialize(name) @name = name end
Public Instance Methods
superclass()
click to toggle source
Safeguard in case pool cannot be retrieved for owner. This makes the error clear
# File lib/simple/sharding/connection_handler.rb, line 60 def superclass raise Exception, "ConnectionPool could not be retrieved for #{self}. " end
to_s()
click to toggle source
in case owner ends up printed by rails in an error message when retrieving connection
# File lib/simple/sharding/connection_handler.rb, line 65 def to_s "ConnectionPoolOwner with name #{self.name}" end