Sha256: 63894184a32ee128de154b4d669e541cacce673648a67656b488bc6a4b31fcc4

Contents?: true

Size: 919 Bytes

Versions: 163

Compression:

Stored size: 919 Bytes

Contents

if Concurrent.on_jruby?

  require 'concurrent/executor/java_executor_service'
  require 'concurrent/executor/serial_executor_service'

  module Concurrent

    # @!macro single_thread_executor
    # @!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

      private
      
      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

163 entries across 150 versions & 33 rubygems

Version Path
logstash-output-scalyr-0.2.1.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.2.0 vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.2.0.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.26.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.25.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.24.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.23.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.22.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.21.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.20.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.19.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.18.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.17.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.16.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.15.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.14.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.13 vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.12 vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.11.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb
logstash-output-scalyr-0.1.10.beta vendor/bundle/jruby/2.5.0/gems/concurrent-ruby-1.1.5/lib/concurrent/executor/java_single_thread_executor.rb