edu.virginia.cs.mng.hypercast.HC
Class HC_WaitObject

java.lang.Object
  |
  +--edu.virginia.cs.mng.hypercast.HC.HC_WaitObject

class HC_WaitObject
extends java.lang.Object

This class is used to hold the cache of messages used to keep track of the experiment.


Field Summary
(package private)  IP_Address[] addrs
          Addresses of the Portals in the experiment.
(package private)  java.io.PrintStream err
           
(package private)  Experiment experiment
           
(package private)  org.w3c.dom.Document[] heavyMsgs
          Complete GetValues request messages for Portals.
(package private)  int[] LAs
          The logical addressees of the sockets.
(package private)  org.w3c.dom.Document[] lightMsgs
          "Replay" GetValue request messages for Portals.
(package private)  int msgsNeeded
          The number of runservers being used.
(package private)  java.io.PrintStream out
           
(package private)  HC_RC2 rc2
           
(package private)  org.w3c.dom.Document[] result
          Stores messages received.
(package private)  int socketsUsed
          The number of sockets being used.
(package private)  int[] States
          The states of the sockets.
 
Constructor Summary
HC_WaitObject(HC_RC2 r, Experiment e, java.io.PrintStream ps_out, java.io.PrintStream ps_err)
           
 
Method Summary
private  boolean experimentChanged(Experiment e)
          Returns true if the experiment has changed and messages and other cached info needs to be remade.
 boolean isStable()
          Returns true if the hypercube is stable.
private  void makeMessages()
          Creates the cache of messages to be sent to the RunServers.
private  void remakeStateCounters()
          Remakes the LA and state counters for the experiment.
 void sendMessages()
          Decides which RunServers should receive heavy and light messages, sends the messages, and processes replies.
private  void setNumOfMessages()
          Calculates the number of RunServers and the number of Sockets.
 void update(Experiment e)
          Remakes messages and cached info if necessary.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

rc2

HC_RC2 rc2

experiment

Experiment experiment

out

java.io.PrintStream out

err

java.io.PrintStream err

heavyMsgs

org.w3c.dom.Document[] heavyMsgs
Complete GetValues request messages for Portals. (As opposed to the "Replay" messages in lightMsgs.

lightMsgs

org.w3c.dom.Document[] lightMsgs
"Replay" GetValue request messages for Portals. These can only be sent after a "heavy message" has been sent and primed the cache.

addrs

IP_Address[] addrs
Addresses of the Portals in the experiment.

result

org.w3c.dom.Document[] result
Stores messages received.

msgsNeeded

int msgsNeeded
The number of runservers being used.

socketsUsed

int socketsUsed
The number of sockets being used.

LAs

int[] LAs
The logical addressees of the sockets.

States

int[] States
The states of the sockets.
Constructor Detail

HC_WaitObject

public HC_WaitObject(HC_RC2 r,
                     Experiment e,
                     java.io.PrintStream ps_out,
                     java.io.PrintStream ps_err)
Method Detail

update

public void update(Experiment e)
Remakes messages and cached info if necessary.

experimentChanged

private boolean experimentChanged(Experiment e)
Returns true if the experiment has changed and messages and other cached info needs to be remade.

setNumOfMessages

private void setNumOfMessages()
Calculates the number of RunServers and the number of Sockets.

remakeStateCounters

private void remakeStateCounters()
Remakes the LA and state counters for the experiment.

makeMessages

private void makeMessages()
Creates the cache of messages to be sent to the RunServers.

sendMessages

public void sendMessages()
Decides which RunServers should receive heavy and light messages, sends the messages, and processes replies.

isStable

public boolean isStable()
Returns true if the hypercube is stable.