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.
-
ObjectSpace()
- Constructor.
-
doInRead(Object[], int, boolean, boolean, long)
- Actually performs in and read operations both blocking
and non-blocking from a object array.
-
doOut(Object[], int)
- Actually performs the out operations (out methods are just
wrapper for this one).
-
getIndex()
- Returns the index of the matching object of the last multiple
in/read operation.
-
in(Object)
- Performs the in linda operation.
-
in(Object, long)
- Performs the in linda operation.
-
in(Object[], int)
- Performs the in linda operation on a object array.
-
in(Object[], int, long)
- Performs the in linda operation on a object array.
-
in_nb(Object)
- Performs the non-blocking in linda operation.
-
in_nb(Object[], int)
- Performs the non-blocking in linda operation on a object array.
-
out(Object)
- Performs the out linda operation.
-
out(Object[], int)
- Performs the out linda operation on a object array.
-
print()
- Prints the object space contents to System.out.
-
read(Object)
- Performs the read linda operation.
-
read(Object, long)
- Performs the read linda operation.
-
read(Object[], int)
- Performs the read linda operation on a object array.
-
read(Object[], int, long)
- Performs the read linda operation on a object array.
-
read_nb(Object)
- Performs the non-blocking read linda operation.
-
read_nb(Object[], int)
- Performs the non-blocking read linda operation on a
object array.
-
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
ObjectSpace
public ObjectSpace()
- Constructor. Builds an empty object space.
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.
out
public void out(Object item)
- Performs the out linda operation.
Puts the item item into the object space.
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.
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
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.
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.
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
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
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
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
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.
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.
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
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
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
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
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
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
print
public synchronized void print()
- Prints the object space contents to System.out.
All Packages Class Hierarchy This Package Previous Next Index