lib/mongo/server/monitor.rb in mongo-2.4.3 vs lib/mongo/server/monitor.rb in mongo-2.5.0.beta

- old
+ new

@@ -21,10 +21,11 @@ # a separate thread as to not disrupt other operations. # # @since 2.0.0 class Monitor include Loggable + extend Forwardable # The default time for a server to refresh its status is 10 seconds. # # @since 2.0.0 HEARTBEAT_FREQUENCY = 10.freeze @@ -55,9 +56,13 @@ # @return [ Time ] last_scan The time of the last server scan. # # @since 2.4.0 attr_reader :last_scan + + # The compressor is determined during the handshake, so it must be an attribute + # of the connection. + def_delegators :connection, :compressor # Force the monitor to immediately do a check of its server. # # @example Force a scan. # monitor.scan!