[ 
https://issues.apache.org/jira/browse/SAMZA-120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13864388#comment-13864388
 ] 

Chris Riccomini commented on SAMZA-120:
---------------------------------------

Yeah, I think offer requires a different API method. We could add that, but I'd 
rather do it as a separate ticket, when the need arises. Given the current 
method signature, the choice is really between add and put. I think put is the 
better option because it's more flexible: add-like behavior can still be 
accomplished by checking the queue size before calling add on the 
BlockingEnvelopeMap.

> Switch BlockingEnvelopeMap to use put instead of add
> ----------------------------------------------------
>
>                 Key: SAMZA-120
>                 URL: https://issues.apache.org/jira/browse/SAMZA-120
>             Project: Samza
>          Issue Type: Bug
>          Components: container
>    Affects Versions: 0.6.0
>            Reporter: Chris Riccomini
>            Assignee: Chris Riccomini
>         Attachments: SAMZA-120.0.patch
>
>
> BlockingEnvelopeMap currently uses .add instead of .put. This works fine, 
> since the queue is unbounded by default. However, there are use cases where 
> we want a bounded queue, and in such a case, it seems more sane to block, 
> rather than throw exceptions (as .add does), if the queue is full.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to