Sha256: a864f0b78e188c5086750f8274e85e691a104cd94aad36b36f5182a8738d7d22

Contents?: true

Size: 303 Bytes

Versions: 42

Compression:

Stored size: 303 Bytes

Contents

# encoding: utf-8

require 'one_apm/support/event_buffer'

module OneApm
  module Agent
    class SizedBuffer < EventBuffer

      def append_event(x)
        if @items.size < @capacity
          @items << x
          return x
        else
          return nil
        end
      end

    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
oneapm_rpm-1.2.9.rc1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.8 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.8.rc1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.7 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.7.rc1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.6 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.6.rc1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.5 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.5.rc1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.4 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.4.rc1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.3 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.3.rc2 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.2 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.2.rc lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.1.rc lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.0 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.1.3 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.1.2 lib/one_apm/support/event_buffer/sized_buffer.rb