Class jada.ObjectSpace
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jada.ObjectSpace

java.lang.Object
   |
   +----jada.ObjectSpace

public class ObjectSpace
extends Object
Object Space class.
This is the Jada core class. Using this class methods you can access the shared object space.

Constructor Index

 o ObjectSpace()
Constructor.

Method Index

 o doInRead(Object[], int, boolean, boolean, long)
Actually performs in and read operations both blocking and non-blocking from a object array.
 o doOut(Object[], int)
Actually performs the out operations (out methods are just wrapper for this one).
 o getIndex()
Returns the index of the matching object of the last multiple in/read operation.
 o in(Object)
Performs the in linda operation.
 o in(Object, long)
Performs the in linda operation.
 o in(Object[], int)
Performs the in linda operation on a object array.
 o in(Object[], int, long)
Performs the in linda operation on a object array.
 o in_nb(Object)
Performs the non-blocking in linda operation.
 o in_nb(Object[], int)
Performs the non-blocking in linda operation on a object array.
 o out(Object)
Performs the out linda operation.
 o out(Object[], int)
Performs the out linda operation on a object array.
 o print()
Prints the object space contents to System.out.
 o read(Object)
Performs the read linda operation.
 o read(Object, long)
Performs the read linda operation.
 o read(Object[], int)
Performs the read linda operation on a object array.
 o read(Object[], int, long)
Performs the read linda operation on a object array.
 o read_nb(Object)
Performs the non-blocking read linda operation.
 o read_nb(Object[], int)
Performs the non-blocking read linda operation on a object array.
 o reset()
Resets the object space (by deleting its contents) Note: although the interface allows this method to throw a JadaException exception this never actually happens using ObjectSpace but can happen using its derived class ObjectClient

Constructors

 o ObjectSpace
  public ObjectSpace()
Constructor. Builds an empty object space.

Methods

 o getIndex
  public int getIndex()
Returns the index of the matching object of the last multiple in/read operation. Be very careful: an ObjectSpace can be shared among different threads, and any can perform an operation which way change this value. Be sure to know which is the last operation performed on the ObjectSpace before using this method.
 o out
  public void out(Object item)
Performs the out linda operation. Puts the item item into the object space.
 o out
  public void out(Object objects[],
                  int n_objects)
Performs the out linda operation on a object array. Puts n_objects from the array objects into the object space.
 o doOut
  public synchronized void doOut(Object objects[],
                                 int n_objects) throws JadaException
Actually performs the out operations (out methods are just wrapper for this one). I suggest not to use this method directly unless you really know what you're doing Note: although the interface allows this method to throw a JadaException exception this never actually happens using ObjectSpace but can happen using its derived class ObjectClient
 o read_nb
  public Object read_nb(Object match)
Performs the non-blocking read linda operation. Returns the object (if it exists) that matches the match object in the object space. If the object does not exist returns null.
 o read_nb
  public Object read_nb(Object match[],
                        int n_objects)
Performs the non-blocking read linda operation on a object array. Returns the objectt (if it exists) that matches one item of the match object array in the object space. If the object does not exist returns null.
 o read
  public Object read(Object match)
Performs the read linda operation. Returns the object that matches the match object. This method does not return until such a object is available
 o read
  public Object read(Object match,
                     long timeout)
Performs the read linda operation. Wait for a tuple to be available up to timeout ms. Returns the object that matches the match object. This method does not return until such a object is available
 o read
  public Object read(Object match[],
                     int n_objects)
Performs the read linda operation on a object array. Returns the object that matches one item of the match object array. This method does not return until such a object is available
 o read
  public Object read(Object match[],
                     int n_objects,
                     long timeout)
Performs the read linda operation on a object array. Wait for a tuple to be available up to timeout ms. Returns the object that matches one item of the match object array. This method does not return until such a object is available
 o in_nb
  public Object in_nb(Object match)
Performs the non-blocking in linda operation. Returns the object (if it exists) that matches the match object from the object space. If the object does not exists returns null.
 o in_nb
  public Object in_nb(Object match[],
                      int n_objects)
Performs the non-blocking in linda operation on a object array. Returns the object (if it exists) that matches one item of the match object array in the object space. If the object does not exist returns null.
 o in
  public Object in(Object match)
Performs the in linda operation. Returns the object that matches the match object. This method does not return until such a object is available
 o in
  public Object in(Object match,
                   long timeout)
Performs the in linda operation. Wait for a tuple to be available up to timeout ms. Returns the object that matches the match object. This method does not return until such a object is available
 o in
  public Object in(Object match[],
                   int n_objects)
Performs the in linda operation on a object array. Returns the object that matches one of the items of the match object. This method does not return until such a object is available
 o in
  public Object in(Object match[],
                   int n_objects,
                   long timeout)
Performs the in linda operation on a object array. Wait for a tuple to be available up to timeout ms. Returns the object that matches one of the items of the match object. This method does not return until such a object is available
 o doInRead
  public synchronized Object doInRead(Object match[],
                                      int n_objects,
                                      boolean remove,
                                      boolean blocking,
                                      long timeout) throws JadaException
Actually performs in and read operations both blocking and non-blocking from a object array. The blocking, non-blocking, in and read methods of this class are just wrappers for this method. I suggest not to use this method directly unless you really know what you're doing. Note: although the interface allows this method to throw a JadaException exception this never actually happens using ObjectSpace but can happen using its derived class ObjectClient
 o reset
  public synchronized void reset() throws JadaException
Resets the object space (by deleting its contents) Note: although the interface allows this method to throw a JadaException exception this never actually happens using ObjectSpace but can happen using its derived class ObjectClient
 o print
  public synchronized void print()
Prints the object space contents to System.out.

All Packages  Class Hierarchy  This Package  Previous  Next  Index