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 1
     private final CommSpaceElement[] table;

          // Constructors 1
     CommSpace(int);

          // Methods 9
     private final void checkIndex(int);
     private void notifyOnIndex(int);
     CommSpaceElement read(int) throws ArrayIndexOutOfBoundsException;
     final int size();
     CommSpaceElement swap(int, CommSpaceElement);
     CommSpaceElement take(int) throws ArrayIndexOutOfBoundsException;
     private void waitOnIndex(int) throws InterruptedException;
     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

The table mapping indicies to elements.


  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 function may create 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) 


· notifyOnIndex

Summary  |  Top
   private void notifyOnIndex(int index) 

Notify potential interested parties about a change at the given index.



· waitOnIndex

Summary  |  Top
   private void waitOnIndex(int index)  throws InterruptedException

Wait for something to change in the slot at the given index.



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