Sha256: f5e8079134c155241022f69831e9e56c98a6ddc938321aa85731d08132d49168

Contents?: true

Size: 894 Bytes

Versions: 21

Compression:

Stored size: 894 Bytes

Contents

if Concurrent.on_jruby?

  require 'concurrent/executor/executor_service'

  module Concurrent

    # @!macro single_thread_executor
    # @!macro thread_pool_options
    # @!macro abstract_executor_service_public_api
    # @!visibility private
    class JavaSingleThreadExecutor < JavaExecutorService
      include SerialExecutorService

      # @!macro single_thread_executor_method_initialize
      def initialize(opts = {})
        super(opts)
      end

      protected
      
      def ns_initialize(opts)
        @executor = java.util.concurrent.Executors.newSingleThreadExecutor
        @fallback_policy = opts.fetch(:fallback_policy, :discard)
        raise ArgumentError.new("#{@fallback_policy} is not a valid fallback policy") unless FALLBACK_POLICY_CLASSES.keys.include?(@fallback_policy)
        self.auto_terminate = opts.fetch(:auto_terminate, true)
      end
    end
  end
end

Version data entries

21 entries across 19 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/executor/java_single_thread_executor.rb
logstash-filter-zabbix-0.1.1 vendor/bundle/jruby/1.9/gems/concurrent-ruby-0.9.2-java/lib/concurrent/executor/java_single_thread_executor.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/concurrent-ruby-0.9.2-java/lib/concurrent/executor/java_single_thread_executor.rb
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/concurrent-ruby-0.9.2-java/lib/concurrent/executor/java_single_thread_executor.rb
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/concurrent-ruby-0.9.2-java/lib/concurrent/executor/java_single_thread_executor.rb
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/concurrent-ruby-0.9.2-java/lib/concurrent/executor/java_single_thread_executor.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/executor/java_single_thread_executor.rb
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/concurrent-ruby-0.9.1-java/lib/concurrent/executor/java_single_thread_executor.rb
logstash-codec-json-2.0.3 vendor/gems/concurrent-ruby-0.9.1-java/lib/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-0.9.2-java lib/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-0.9.2 lib/concurrent/executor/java_single_thread_executor.rb
logstash-input-beats-0.9.2 vendor/jruby/1.9/gems/concurrent-ruby-0.9.1-java/lib/concurrent/executor/java_single_thread_executor.rb
logstash-input-beats-0.9.1 vendor/jruby/1.9/gems/concurrent-ruby-0.9.1-java/lib/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-0.9.1 lib/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-0.9.1-java lib/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-0.9.0 lib/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-0.9.0-java lib/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-0.9.0.pre3-java lib/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-0.9.0.pre3 lib/concurrent/executor/java_single_thread_executor.rb
concurrent-ruby-0.9.0.pre2 lib/concurrent/executor/java_single_thread_executor.rb