Class: Agent::Queue::Unbuffered

Inherits:
Agent::Queue show all
Defined in:
lib/agent/queue/unbuffered.rb

Instance Attribute Summary collapse

Attributes inherited from Agent::Queue

#operations, #type

Instance Method Summary collapse

Methods inherited from Agent::Queue

#close, #closed?, #initialize, #open?, #pop, #push, #remove_operations

Constructor Details

This class inherits a constructor from Agent::Queue

Instance Attribute Details

#waiting_pops ⇒ Object (readonly)

Returns the value of attribute waiting_pops.



7
8
9
# File 'lib/agent/queue/unbuffered.rb', line 7

def waiting_pops
  @waiting_pops
end

#waiting_pushes ⇒ Object (readonly)

Returns the value of attribute waiting_pushes.



7
8
9
# File 'lib/agent/queue/unbuffered.rb', line 7

def waiting_pushes
  @waiting_pushes
end

Instance Method Details

#buffered? ⇒ Boolean

Returns:

  • (Boolean)


9
# File 'lib/agent/queue/unbuffered.rb', line 9

def buffered?;   false; end

#pop? ⇒ Boolean

Returns:

  • (Boolean)


13
# File 'lib/agent/queue/unbuffered.rb', line 13

def pop?;  @waiting_pushes > 0; end

#push? ⇒ Boolean

Returns:

  • (Boolean)


12
# File 'lib/agent/queue/unbuffered.rb', line 12

def push?; @waiting_pops > 0;   end

#unbuffered? ⇒ Boolean

Returns:

  • (Boolean)


10
# File 'lib/agent/queue/unbuffered.rb', line 10

def unbuffered?; true;  end