All Packages Class Hierarchy This Package Previous Next Index
Class macondo.mistero.Result
macondo.mistero.Result
- public class Result
A Result
object is returned as a result of a tuple
request. This way tuples requests are completely decoupled from
the corresponding result fetching.
-
ERROR
-
-
IN
-
-
RD
-
-
Result(ObjectSpace, Tuple, int)
- Builds a new
Result
object for a tuple request.
-
getObject()
- Returns the result tuple of this request.
-
getObject(long)
- Returns the result tuple of this request.
-
isAvailable()
- Tests if the result is available.
-
isError()
- Tests if any error occurs while performing the request.
-
kill()
- Kills the current tuple request.
-
run()
- Performs the real tuple request asynchronously.
IN
public static final int IN
RD
public static final int RD
ERROR
public static final Object ERROR
Result
public Result(ObjectSpace space,
Tuple formal,
int op)
- Builds a new
Result
object for a tuple request.
- Parameters:
- space - the tuple space where the operation is performed.
- formal - the template tuple.
- op - the operation identifier.
isAvailable
public final synchronized boolean isAvailable()
- Tests if the result is available.
- Returns:
-
true
if the result is available,
false
otherwise.
isError
public final synchronized boolean isError()
- Tests if any error occurs while performing the request.
- Returns:
-
true
if an error occurs while performing
the request, false
otherwise.
getObject
public final synchronized Object getObject()
- Returns the result tuple of this request. If the result is
not available this method blocks the calling thread.
- Returns:
- the result tuple of this request.
getObject
public final synchronized Object getObject(long timeout)
- Returns the result tuple of this request. If the result is not
available waits for the specified timeout. If the timeout value
is 0 returns the current value of the result.
- Returns:
- the result tuple of this request.
kill
public final synchronized void kill()
- Kills the current tuple request.
run
public void run()
- Performs the real tuple request asynchronously.
All Packages Class Hierarchy This Package Previous Next Index