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.


Variable Index

 o ERROR
 o IN
 o RD

Constructor Index

 o Result(ObjectSpace, Tuple, int)
Builds a new Result object for a tuple request.

Method Index

 o getObject()
Returns the result tuple of this request.
 o getObject(long)
Returns the result tuple of this request.
 o isAvailable()
Tests if the result is available.
 o isError()
Tests if any error occurs while performing the request.
 o kill()
Kills the current tuple request.
 o run()
Performs the real tuple request asynchronously.

Variables

 o IN
 public static final int IN
 o RD
 public static final int RD
 o ERROR
 public static final Object ERROR

Constructors

 o 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.

Methods

 o isAvailable
 public final synchronized boolean isAvailable()
Tests if the result is available.

Returns:
true if the result is available, false otherwise.
 o 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.
 o 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.
 o 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.
 o kill
 public final synchronized void kill()
Kills the current tuple request.

 o run
 public void run()
Performs the real tuple request asynchronously.


All Packages  Class Hierarchy  This Package  Previous  Next  Index