Internal implementation detail of Hoodoo::Communicators::Pool which is placed on a Ruby Queue and used as part of thread processing for slow communicators.
- D
- N
- S
- T
[RW] | dropped | If not |
[RW] | payload | If the entry represents neither a termination request nor a dropped message count (see terminate? and dropped?), the payload to send to the slow communicator subclass's communicate method. |
[RW] | sync | If |
[RW] | terminate | If |
Create a new instance, ready to be added to the Queue.
ONLY USE ONE of the named parameters:
payload
-
A parameter to send to communicate in the communicator.
dropped
-
The integer to send to dropped in the communicator.
terminate
-
Set to
true
to exit the processing thread when the entry is read from the Queue. sync
-
Set to
true
to push a message onto the sync Queue.
Source: show
# File lib/hoodoo/communicators/pool.rb, line 571 def initialize( payload: nil, dropped: nil, terminate: false, sync: false ) @payload = payload @dropped = dropped @terminate = terminate @sync = sync end
Returns true
if this queue entry represents a dropped message
count (see dropped), else
+false (see terminate?
then payload).
Source: show
# File lib/hoodoo/communicators/pool.rb, line 595 def dropped? @dropped != nil && @dropped > 0 end