edu.virginia.cs.mng.hypercast.testing_and_monitoring
Class Experiment

java.lang.Object
  |
  +--edu.virginia.cs.mng.hypercast.testing_and_monitoring.Experiment

public class Experiment
extends java.lang.Object

This class contains values associated with an experiment in RC2. Any class that extends RC2 may want to have a class extending this one.

This class dictates the current state of the experiment, the number of sockets on each RS2, and the times this experiment was created, started, and stopped.


Field Summary
 long createTime
          The time this object was created.
static int JUST_CREATED
          a possible value for state.
 int[] nodesOnServers
          The number of sockets assigned to each RS2.
static int PARTIALLY_RUNNING
          a possible value for state.
static int RUNNING
          a possible value for state.
 long startTime
          The time the experiment was started.
 int state
          The current state of the experiment.
static int STOPPED
          a possible value for state.
 long stopTime
          The time the experiment was stopped.
 
Constructor Summary
Experiment()
          Constructor.
Experiment(Experiment e)
          Copy constructor.
 
Method Summary
 java.lang.Object clone()
          Clones this object.
static int minutes(long t)
          Returns the integer number of minutes since time 0.
static double secondsAndFraction(long t)
          Returns the number of seconds (not including minutes) since time 0 as type double.
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

JUST_CREATED

public static final int JUST_CREATED
a possible value for state.

PARTIALLY_RUNNING

public static final int PARTIALLY_RUNNING
a possible value for state.

RUNNING

public static final int RUNNING
a possible value for state.

STOPPED

public static final int STOPPED
a possible value for state.

state

public int state
The current state of the experiment.

nodesOnServers

public int[] nodesOnServers
The number of sockets assigned to each RS2. If nodesOnServer[2] == 10 then sockets 0 through 9 on the RS2 at index 2 are part of the experiment.

createTime

public long createTime
The time this object was created.

startTime

public long startTime
The time the experiment was started.

stopTime

public long stopTime
The time the experiment was stopped.
Constructor Detail

Experiment

public Experiment()
Constructor. state is set to JUST_CREATED. All times are set to 0.

Experiment

public Experiment(Experiment e)
Copy constructor.
Method Detail

minutes

public static int minutes(long t)
Returns the integer number of minutes since time 0.

secondsAndFraction

public static double secondsAndFraction(long t)
Returns the number of seconds (not including minutes) since time 0 as type double.

clone

public java.lang.Object clone()
Clones this object.
Overrides:
clone in class java.lang.Object