org.codehaus.gpars

groovyx.gpars.dataflow
[Java] Interface SelectableChannel


public interface SelectableChannel

Created with IntelliJ IDEA. User: Vaclav Date: 5.7.13 Time: 22:17 To change this template use File | Settings | File Templates.


Method Summary
DataflowExpression poll()

Retrieves the value at the head of the buffer.

void wheneverBound(groovy.lang.Closure closure)

Send all pieces of data bound in the future to the provided stream when it becomes available

void wheneverBound(MessageStream stream)

Send all pieces of data bound in the future to the provided stream when it becomes available.

 

Method Detail

poll

@java.lang.SuppressWarnings({"ClassReferencesSubclass"})
public DataflowExpression poll()
Retrieves the value at the head of the buffer. Returns null, if no value is available.
throws:
InterruptedException If the current thread is interrupted
Returns:
The value bound to the DFV at the head of the stream or null


wheneverBound

public void wheneverBound(groovy.lang.Closure closure)
Send all pieces of data bound in the future to the provided stream when it becomes available. *
Parameters:
closure - closure to execute when data becomes available. The closure should take at most one argument.


wheneverBound

public void wheneverBound(MessageStream stream)
Send all pieces of data bound in the future to the provided stream when it becomes available.
Parameters:
stream - stream where to send result


 

Copyright © 2008–2013 Václav Pech. All Rights Reserved.