Class: LogStash::Util::WrappedSynchronousQueue
- Inherits:
-
Object
- Object
- LogStash::Util::WrappedSynchronousQueue
- Defined in:
- lib/logstash/util/wrapped_synchronous_queue.rb
Defined Under Namespace
Classes: ReadBatch, ReadClient, WriteClient
Instance Attribute Summary collapse
-
#queue ⇒ Object
readonly
Returns the value of attribute queue.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(size) ⇒ WrappedSynchronousQueue
constructor
A new instance of WrappedSynchronousQueue.
- #read_client ⇒ Object
- #write_client ⇒ Object
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
#queue ⇒ Object (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
#close ⇒ Object
23 24 25 |
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 23 def close # ignore end |
#read_client ⇒ Object
19 20 21 |
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 19 def read_client ReadClient.new(@queue) end |
#write_client ⇒ Object
15 16 17 |
# File 'lib/logstash/util/wrapped_synchronous_queue.rb', line 15 def write_client WriteClient.new(@queue) end |