<tspace-read>
Read entries from the Tuple Space service.
Attributes (ncsa.tools.ogrescript.tspace.tasks.TspaceTask
)
NAME |
TYPE |
DEFAULT VALUE |
DESCRIPTION |
---|---|---|---|
serviceUri |
|
(required) |
endpoint of the Tuple Space service |
name |
|
(required) |
name of variable to assign result to |
global |
|
false |
assign to global frame |
declare |
|
true |
declare variable name rather than assign to previously declared name in scope |
Attributes
NAME |
TYPE |
DEFAULT VALUE |
DESCRIPTION |
---|---|---|---|
max |
|
1 |
maximum number of entries to return |
Elements
TAG |
TYPE |
COUNT |
DESCRIPTION |
---|---|---|---|
|
0:1 |
match constraints constituting the query |
|
|
|
0:N |
do not return entry with this id |
|
array of |
0:N |
do not return entries with these ids |
NOTES
- The
<exclude(s)>
elements are converted into a comma-delimited string and set as the value of the<exclude-ids>
element of the<tspace-match-request>
element. - The call to
ITupleSpace.read()
does not return anull
result.
Examples
<ogrescript name="test-tspace"> <tspace-write serviceUri="http://otfrid.ncsa.uiuc.edu:8080/vizier.tspace/services/TupleSpace" name="tid" declare="true"> <entry producer="AL" consumer="AL" typeName0="test" typeValue0="test" takeIntervalLimit="120000" allowedRetries="2"> <user-facing.configuration> <property name="var0" value="val0" /> </user-facing.configuration> </entry> </tspace-write> <echo message="tuple id is: ${tid}" /> <tspace-take block="false" serviceUri="http://otfrid.ncsa.uiuc.edu:8080/vizier.tspace/services/TupleSpace" name="tuple" declare="true" max="1"> <match-request typeValue0="test" producer="AL" /> </tspace-take> <echo message="tuple is:" /> <echo message="${tuple}" /> <tspace-write serviceUri="http://otfrid.ncsa.uiuc.edu:8080/vizier.tspace/services/TupleSpace" name="tid" declare="false"> <entry id="${tid}" retried="1" /> </tspace-write> <sleep seconds="5" /> <tspace-take block="false" serviceUri="http://otfrid.ncsa.uiuc.edu:8080/vizier.tspace/services/TupleSpace" name="tuple" declare="false" max="1"> <match-request typeValue0="test" producer="AL" /> </tspace-take> <echo message="tuple is:" /> <echo message="${tuple}" /> <declare name="now"> <date-time type="millis" /> </declare> <tspace-write serviceUri="http://otfrid.ncsa.uiuc.edu:8080/vizier.tspace/services/TupleSpace" name="tid" declare="false"> <entry id="${tid}" retried="1" timeCompleted="${now}" /> </tspace-write> </ogrescript>