jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
gpars (Groovy Parallel Systems)
  • gpars (Groovy Parallel Systems)
  • GPARS-177

DF API polish

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.0.0
  • Component/s: Dataflow
  • Labels:
    None
  • Number of attachments :
    0

Description

Reconsider the API for dataflow channels, especially with respect to querying the size and unification with the Queue interface.
Operators may need error handling to be revisited.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Vaclav Pech added a comment - 09/Jun/11 1:35 AM

In the current implementation the bind() method is an equivalent to <<, while the whenBound() is the same as >>. I typically use these methods when manipulating dataflow channels from Java.

To visualize the situation so as we could make decisions here, we should probably match the Queue interface methods with what we currently have in DataflowReadChannel:

boolean add(E e); - equivalent with bind()
boolean offer(E e); - no equivalent, since DataflowQueue is unbouded, our bind() always succeeds
E remove(); - equivalent to getVal(), although we block (optionally with a timeout), if no message is in the queue. asynchronous variants getValAsync() are also available
E poll(); - equivalent to poll()
E element(); - no equivalent, we do not support reading a value off the queue without actually taking it
E peek(); - no equivalent, we do not support reading a value off the queue without actually taking it

Show
Vaclav Pech added a comment - 09/Jun/11 1:35 AM In the current implementation the bind() method is an equivalent to <<, while the whenBound() is the same as >>. I typically use these methods when manipulating dataflow channels from Java. To visualize the situation so as we could make decisions here, we should probably match the Queue interface methods with what we currently have in DataflowReadChannel: boolean add(E e); - equivalent with bind() boolean offer(E e); - no equivalent, since DataflowQueue is unbouded, our bind() always succeeds E remove(); - equivalent to getVal(), although we block (optionally with a timeout), if no message is in the queue. asynchronous variants getValAsync() are also available E poll(); - equivalent to poll() E element(); - no equivalent, we do not support reading a value off the queue without actually taking it E peek(); - no equivalent, we do not support reading a value off the queue without actually taking it

People

  • Assignee:
    Vaclav Pech
    Reporter:
    Vaclav Pech
Vote (0)
Watch (1)

Dates

  • Created:
    28/May/11 11:02 PM
    Updated:
    05/Sep/12 10:10 PM
    Resolved:
    05/Sep/12 10:10 PM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.