edu.virginia.cs.mng.hypercast.DT
Class DT_WaitObject

java.lang.Object
  |
  +--edu.virginia.cs.mng.hypercast.DT.DT_WaitObject

class DT_WaitObject
extends java.lang.Object


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)  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)  DT_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
DT_WaitObject(DT_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 topology is stable.
private  void makeMessages()
          Creates the cache of messages to be sent to the RunServers.
private  void remakeStateCounters()
          Remakes the 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

DT_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.

States

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

DT_WaitObject

public DT_WaitObject(DT_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 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 topology is stable.