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.4.2 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.4.1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.4.0 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.3.7 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.3.7.rc1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.3.6 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.3.6.rc1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.3.5 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.3.5.rc1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.3.4 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.3.4.rc1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.3.3 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.3.3.rc1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.3.2 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.3.2.rc1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.3.1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.3.1.rc1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.3.0 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.3.0.rc1 lib/one_apm/support/event_buffer/sized_buffer.rb
oneapm_rpm-1.2.9 lib/one_apm/support/event_buffer/sized_buffer.rb