All Packages  This Package  Class Hierarchy  Class Search  Index

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

  Summary

public class  CommSpaceHandle
     extends java.lang.Object
{
          // Fields 1
     private CommSpace commSpace;

          // Constructors 3
     public CommSpaceHandle();
     CommSpaceHandle(CommSpace);
     CommSpaceHandle(CommSpaceHandle);

          // Methods 12
     private static CommSpaceElement copy(CommSpaceElement);
     public static CommSpaceHandle newCommSpace(CommSpaceHandle, int);
     public static CommSpaceHandle newCommSpace(int);

     boolean empty();
     void handleFor(CommSpace);
     public CommSpaceElement read(int) throws ArrayIndexOutOfBoundsException;
     public int resize(int);
     public int size();
     public CommSpaceElement swap(int, CommSpaceElement) throws ArrayIndexOutOfBoundsException;
     public CommSpaceElement take(int) throws ArrayIndexOutOfBoundsException;
     public CommSpaceElement waitToTake(int) throws ArrayIndexOutOfBoundsException, InterruptedException;
     public void write(int, CommSpaceElement) throws ArrayIndexOutOfBoundsException;
}

Each flow has exactly one CommSpaceHandle. The CommSpaceHandle points to exactly one CommSpace.

XXX Semantics during a failed take() are probably wrong.


  Cross Reference

Returned By:
PrimordialNode.fillNeighborSpace(), PrimordialNode.fireUpNewFlow(), UnknownMidPackets.spaceForMID(), CommSpaceElement.getCommSpaceHandle(), CommSpaceHandle.newCommSpace(), CommSpaceHandle.newCommSpace()





  Fields

· commSpace

Summary  |  Top
   private CommSpace commSpace


  Constructors

· CommSpaceHandle

Summary  |  Top

   public CommSpaceHandle() 


· CommSpaceHandle

Summary  |  Top
   CommSpaceHandle(CommSpaceHandle other) 

Copy constructor. Only used when passing a csh to a child flow.



· CommSpaceHandle

Summary  |  Top
   CommSpaceHandle(CommSpace commSpace) 


  Methods

· newCommSpace

Summary  |  Top
   public static CommSpaceHandle newCommSpace(int size) 


· newCommSpace

Summary  |  Top
   public static CommSpaceHandle newCommSpace(CommSpaceHandle csh, 
                                              int size) 


· empty

Summary  |  Top
   boolean empty() 


· handleFor

Summary  |  Top
   void handleFor(CommSpace commSpace) 


· size

Summary  |  Top
   public int size() 


· resize

Summary  |  Top
   public int resize(int newsize) 


· write

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

Write a CommSpaceElement into the CommSpace. Overwrites any pre-existing element at that index.



· copy

Summary  |  Top
   private static CommSpaceElement copy(CommSpaceElement e) 

XXX is it necessary to copy the CommSpaceElement out of the CommSpace??



· take

Summary  |  Top
   public CommSpaceElement take(int index)  throws ArrayIndexOutOfBoundsException


· waitToTake

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


· read

Summary  |  Top
   public CommSpaceElement read(int index)  throws ArrayIndexOutOfBoundsException


· swap

Summary  |  Top
   public CommSpaceElement swap(int index, 
                                CommSpaceElement elem)  throws ArrayIndexOutOfBoundsException


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