Methods
Attributes
| [RW] | client |
Public Class methods
[ show source ]
# File lib/phusion_passenger/analytics_logger.rb, line 267
267: def initialize
268: @mutex = Mutex.new
269: @refcount = 1
270: end
Public Instance methods
[ show source ]
# File lib/phusion_passenger/analytics_logger.rb, line 272
272: def disconnect(check_error_response = false)
273: # TODO: implement check_error_response support
274: @client.close if @client
275: end
[ show source ]
# File lib/phusion_passenger/analytics_logger.rb, line 277
277: def ref
278: @refcount += 1
279: end
[ show source ]
# File lib/phusion_passenger/analytics_logger.rb, line 288
288: def synchronize
289: @mutex.synchronize do
290: yield
291: end
292: end
[ show source ]
# File lib/phusion_passenger/analytics_logger.rb, line 281
281: def unref
282: @refcount -= 1
283: if @refcount == 0
284: disconnect
285: end
286: end