All Packages  This Package  Class Hierarchy  Class Search  Index

Class edu.utah.janos.core.CommSpace
java.lang.Object
   |
   +----edu.utah.janos.core.CommSpace

  Summary

class  CommSpace
     extends java.lang.Object
{
          // Fields 2
     private int currentSize;
     private final CommSpaceElement[] table;

          // Constructors 1
     CommSpace(int);

          // Methods 7
     private void checkIndex(int);
     CommSpaceElement read(int) throws ArrayIndexOutOfBoundsException;
     int size();
     CommSpaceElement swap(int, CommSpaceElement);
     CommSpaceElement take(int) throws ArrayIndexOutOfBoundsException;
     CommSpaceElement waitToTake(int) throws ArrayIndexOutOfBoundsException, InterruptedException;
     void write(int, CommSpaceElement) throws ArrayIndexOutOfBoundsException;
}

Variation on an array, with some tuple-space like properties. Objects are not shared between flows, they are copied on read.




  Fields

· table

Summary  |  Top

   private final CommSpaceElement[] table


· currentSize

Summary  |  Top
   private int currentSize


  Constructors

· CommSpace

Summary  |  Top

   CommSpace(int size) 


  Methods

· size

Summary  |  Top
   int size() 


· checkIndex

Summary  |  Top
   private void checkIndex(int index) 


· write

Summary  |  Top
   void write(int index, 
              CommSpaceElement elem)  throws ArrayIndexOutOfBoundsException

Write the given element at the given index. Note that this creates cross-process pointers..



· take

Summary  |  Top
   CommSpaceElement take(int index)  throws ArrayIndexOutOfBoundsException


· waitToTake

Summary  |  Top
   CommSpaceElement waitToTake(int index)  throws ArrayIndexOutOfBoundsException, InterruptedException


· read

Summary  |  Top
   CommSpaceElement read(int index)  throws ArrayIndexOutOfBoundsException


· swap

Summary  |  Top
   CommSpaceElement swap(int index, 
                         CommSpaceElement elem) 


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7