org.codehaus.gpars

groovyx.gpars.dataflow.impl
[Java] Interface SelectRequest


public interface SelectRequest

Represents a request for value from a select. Each request holds a list of guards (boolean flags) to indicate, which input channels of the select should be queried, and a routine to invoke once a value is available.

Authors:
Vaclav Pech Date: 30th Sep 2010


Method Summary
boolean matchesMask(int index)

Checks, whether the given index should be queried for value or not.

void valueFound(int index, java.lang.Object value)

Invoked, when a value has been found bound to any of the input channels monitored by the select.

 

Method Detail

matchesMask

public boolean matchesMask(int index)
Checks, whether the given index should be queried for value or not.
Parameters:
index - The index of the input channel to check for guard
Returns:
True, it the select user is interested in values from the channel represented by the provided index


valueFound

public void valueFound(int index, java.lang.Object value)
Invoked, when a value has been found bound to any of the input channels monitored by the select.
Parameters:
index - The index of the input channel
value - The value obtained from the channel


 

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