Sha256: 9e3015be8e109b75dc73ccb457f77cb10a241cb1fd40bffc92b823297cdcb6b2

Contents?: true

Size: 775 Bytes

Versions: 19

Compression:

Stored size: 775 Bytes

Contents

require 'concurrent/utility/native_extension_loader' # load native part first

module Concurrent
  module Synchronization

    if Concurrent.on_jruby?

      # @!visibility private
      # @!macro internal_implementation_note
      class JavaObject < AbstractObject

        def self.attr_volatile(*names)
          names.each do |name|

            ivar = :"@volatile_#{name}"

            class_eval <<-RUBY, __FILE__, __LINE__ + 1
              def #{name}
                instance_variable_get_volatile(:#{ivar})
              end

              def #{name}=(value)
                instance_variable_set_volatile(:#{ivar}, value)
              end
            RUBY

          end
          names.map { |n| [n, :"#{n}="] }.flatten
        end

      end
    end
  end
end

Version data entries

19 entries across 17 versions & 5 rubygems

Version Path
logstash-filter-zabbix-0.1.2 vendor/bundle/jruby/1.9/gems/concurrent-ruby-0.9.2-java/lib/concurrent/synchronization/java_object.rb
logstash-filter-zabbix-0.1.1 vendor/bundle/jruby/1.9/gems/concurrent-ruby-0.9.2-java/lib/concurrent/synchronization/java_object.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/concurrent-ruby-0.9.2-java/lib/concurrent/synchronization/java_object.rb
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/concurrent-ruby-0.9.2-java/lib/concurrent/synchronization/java_object.rb
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/concurrent-ruby-0.9.2-java/lib/concurrent/synchronization/java_object.rb
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/concurrent-ruby-0.9.2-java/lib/concurrent/synchronization/java_object.rb
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/logstash-codec-json-2.0.3/vendor/gems/concurrent-ruby-0.9.1-java/lib/concurrent/synchronization/java_object.rb
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/concurrent-ruby-0.9.1-java/lib/concurrent/synchronization/java_object.rb
logstash-codec-json-2.0.3 vendor/gems/concurrent-ruby-0.9.1-java/lib/concurrent/synchronization/java_object.rb
concurrent-ruby-0.9.2-java lib/concurrent/synchronization/java_object.rb
concurrent-ruby-0.9.2 lib/concurrent/synchronization/java_object.rb
logstash-input-beats-0.9.2 vendor/jruby/1.9/gems/concurrent-ruby-0.9.1-java/lib/concurrent/synchronization/java_object.rb
logstash-input-beats-0.9.1 vendor/jruby/1.9/gems/concurrent-ruby-0.9.1-java/lib/concurrent/synchronization/java_object.rb
concurrent-ruby-1.0.0.pre1 lib/concurrent/synchronization/java_object.rb
concurrent-ruby-1.0.0.pre1-java lib/concurrent/synchronization/java_object.rb
concurrent-ruby-0.9.1 lib/concurrent/synchronization/java_object.rb
concurrent-ruby-0.9.1-java lib/concurrent/synchronization/java_object.rb
concurrent-ruby-0.9.0 lib/concurrent/synchronization/java_object.rb
concurrent-ruby-0.9.0-java lib/concurrent/synchronization/java_object.rb