diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-03-11 13:49:08 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-03-11 13:49:08 -0800 |
commit | 55c9127ede4114f65b0bc01cdaa1152ef21ca95a (patch) | |
tree | 5683095ed447c0bc81551ccfff2a344e4ab978d5 /lib/raindrops/aggregate/last_data_recv.rb | |
parent | 57fe99f294e0fe948593beeae7cf879efe4cdd52 (diff) | |
download | raindrops-55c9127ede4114f65b0bc01cdaa1152ef21ca95a.tar.gz |
Yes we love Linux more than other systems :>
Diffstat (limited to 'lib/raindrops/aggregate/last_data_recv.rb')
-rw-r--r-- | lib/raindrops/aggregate/last_data_recv.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/raindrops/aggregate/last_data_recv.rb b/lib/raindrops/aggregate/last_data_recv.rb index 87cbfb9..1e18d76 100644 --- a/lib/raindrops/aggregate/last_data_recv.rb +++ b/lib/raindrops/aggregate/last_data_recv.rb @@ -1,8 +1,11 @@ # -*- encoding: binary -*- require "socket" # +# # This module is used to extend TCPServer and Kgio::TCPServer objects -# and aggregate +last_data_recv+ times for all accepted clients. +# and aggregate +last_data_recv+ times for all accepted clients. It +# is designed to be used with Raindrops::LastDataRecv Rack application +# but can be easily changed to work with other stats collection devices. # # Methods wrapped include: # - TCPServer#accept @@ -15,16 +18,19 @@ module Raindrops::Aggregate::LastDataRecv # :startdoc: # The integer value of +last_data_recv+ is sent to this object. + # This is usually a duck type compatible with the \Aggregate class, + # but can be *anything* that accepts the *<<* method. attr_accessor :raindrops_aggregate @@default_aggregate = nil # By default, this is a Raindrops::Aggregate::PMQ object + # It may be anything that responds to *<<* def self.default_aggregate @@default_aggregate ||= Raindrops::Aggregate::PMQ.new end - # assign any object that is duck-type compatible with \Aggregate here, + # Assign any object that responds to *<<* def self.default_aggregate=(agg) @@default_aggregate = agg end |