All Packages  This Package  Class Hierarchy  Class Search  Index

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

  Summary

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

          // Constructors 1
     CommSpace(int);

          // Methods 7
     private final void checkIndex(int);
     CommSpaceElement read(int) throws ArrayIndexOutOfBoundsException;
     final 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.

Author:
Janos Ministry of Development




  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
   final int size() 


· checkIndex

Summary  |  Top
   private final 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