|
org.codehaus.gpars | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object groovyx.gpars.serial.WithSerialId groovyx.gpars.dataflow.expression.DataflowExpression groovyx.gpars.dataflow.DataflowVariable
@java.lang.SuppressWarnings@Override public class DataflowVariable extends DataflowExpression
Represents a thread-safe single-assignment, multi-read variable. Each instance of DataflowVariable can be read repeatedly any time using the 'val' property and assigned once in its lifetime using the '<<' operator. Reads preceding assignment will be blocked until the value is assigned. For actors and Dataflow Operators the asynchronous non-blocking variants of the getValAsync() methods can be used. They register the request to read a value and will send a message to the actor or operator once the value is available.
- Type of values to bind with the DataflowVariableNested Class Summary | |
---|---|
static class |
DataflowVariable.RemoteDataflowVariable
|
Field Summary | |
---|---|
private static long |
serialVersionUID
|
Fields inherited from class WithSerialId | |
---|---|
serialHandle, serialVersionUID |
Constructor Summary | |
DataflowVariable()
|
Method Summary | |
---|---|
private DataflowWriteChannel
|
bindDFV(DataflowReadChannel ref)
|
java.lang.Object
|
get()
|
java.lang.Object
|
get(long timeout, java.util.concurrent.TimeUnit units)
|
java.lang.Throwable
|
getError()
|
java.lang.Class
|
getRemoteClass()
|
boolean
|
isError()
|
DataflowWriteChannel
|
leftShift(java.lang.Object value)
Assigns a value from one DataflowVariable instance to this variable. |
DataflowWriteChannel
|
leftShift(DataflowReadChannel ref)
|
boolean
|
shouldThrowTimeout()
Checks if the promise is bound to an error |
Promise
|
then(groovy.lang.Closure closure, groovy.lang.Closure errorHandler)
|
Promise
|
then(Pool pool, groovy.lang.Closure closure, groovy.lang.Closure errorHandler)
|
Promise
|
then(PGroup group, groovy.lang.Closure closure, groovy.lang.Closure errorHandler)
|
void
|
touch()
|
Methods inherited from class WithSerialId | |
---|---|
createRemoteHandle, getOrCreateSerialHandle, getRemoteClass, writeReplace |
Field Detail |
---|
private static final long serialVersionUID
Constructor Detail |
---|
public DataflowVariable()
Method Detail |
---|
private DataflowWriteChannel bindDFV(DataflowReadChannel ref)
@java.lang.Override*/ @java.lang.SuppressWarnings@Override public final java.lang.Object get()
@java.lang.Overridereturn !this.isBound(); @java.lang.SuppressWarnings} public final java.lang.Object get(long timeout, java.util.concurrent.TimeUnit units)
@java.lang.Override* public java.lang.Throwable getError()
@java.lang.Override@SuppressWarnings({"unchecked"}) @java.lang.SuppressWarnings@Override public java.lang.Class getRemoteClass()
@java.lang.Override} public boolean isError()
@java.lang.Overridereturn bindDFV(ref); public DataflowWriteChannel leftShift(java.lang.Object value)
ref
- The DataflowVariable instance the value of which to bind
@java.lang.Override}); public DataflowWriteChannel leftShift(DataflowReadChannel ref)
boolean shouldThrowTimeout()
@java.lang.Override*/ public Promise then(groovy.lang.Closure closure, groovy.lang.Closure errorHandler)
@java.lang.Override*/ public Promise then(Pool pool, groovy.lang.Closure closure, groovy.lang.Closure errorHandler)
@java.lang.Overrideprivate boolean disconnected; public Promise then(PGroup group, groovy.lang.Closure closure, groovy.lang.Closure errorHandler)
@java.lang.OverridepublicPromise then(final Closure closure, final Closure errorHandler) { public void touch()
Copyright © 2008–2013 Václav Pech. All Rights Reserved.