Class: LogStash::Util::WrappedSynchronousQueue

Inherits:
Object
  • Object
show all
Defined in:
lib/logstash/util/wrapped_synchronous_queue.rb

Defined Under Namespace

Classes: ReadBatch, ReadClient, WriteClient

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(size) ⇒ WrappedSynchronousQueue

Returns a new instance of WrappedSynchronousQueue.



9
10
11
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 9

def initialize (size)
  @queue = ArrayBlockingQueue.new(size)
end

Instance Attribute Details

#queueObject (readonly)

Returns the value of attribute queue.



13
14
15
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 13

def queue
  @queue
end

Instance Method Details

#closeObject



23
24
25
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 23

def close
  # ignore
end

#read_clientObject



19
20
21
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 19

def read_client
  ReadClient.new(@queue)
end

#write_clientObject



15
16
17
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 15

def write_client
  WriteClient.new(@queue)
end