class Mongo::Monitoring::Event::Cmap::ConnectionClosed
Event published when a connection is closed.
@since 2.9.0
Constants
- ERROR
@return [ Symbol ] ERROR Indicates that the connection was closed due to it experiencing
an error.
@since 2.9.0
- HANDSHAKE_FAILED
@return [ Symbol ] HANDSHAKE_FAILED Indicates that the connection was closed due to the
connection handshake failing.
@since 2.9.0
- IDLE
@return [ Symbol ] IDLE Indicates that the connection was closed due to it being idle.
@since 2.9.0
- POOL_CLOSED
@return [ Symbol ] POOL_CLOSED Indicates that the connection was closed due to the pool
already being closed.
@since 2.9.0
- STALE
@return [ Symbol ] STALE Indicates that the connection was closed due to it being stale.
@since 2.9.0
- UNKNOWN
@return [ Symbol ] UNKNOWN Indicates that the connection was closed for an unknown reason.
@since 2.9.0
Attributes
@return [ Mongo::Address ] address The address of the server the pool's connections will
connect to.
@since 2.9.0
@return [ Integer ] #connection_id The ID of the connection.
@since 2.9.0
@return [ Symbol ] reason The reason why the connection was closed.
@since 2.9.0
Public Class Methods
Create the event.
@example Create the event.
ConnectionClosed.new(address, id, reason)
@since 2.9.0 @api private
# File lib/mongo/monitoring/event/cmap/connection_closed.rb, line 83 def initialize(address, id, reason) @reason = reason @address = address @connection_id = id end
Public Instance Methods
Returns a concise yet useful summary of the event.
@return [ String ] String summary of the event.
@note This method is experimental and subject to change.
@since 2.9.0 @api experimental
# File lib/mongo/monitoring/event/cmap/connection_closed.rb, line 97 def summary "#<#{self.class.name.sub(/^Mongo::Monitoring::Event::Cmap::/, '')} " + "address=#{address} connection_id=#{connection_id} reason=#{reason}>" end