nl.tudelft.ewi.alg.distsim
Class MasterProcess<M>

java.lang.Object
  extended by nl.tudelft.ewi.alg.distsim.MasterProcess<M>
Type Parameters:
M - The message payload to be sent around. Can be any type.

public class MasterProcess<M>
extends java.lang.Object

The simulator of the distributed system. DProcesses require a master process to register with.

Author:
Léon Planken, James Boerkoel Jr.

Field Summary
static boolean DEBUG
           
static int DUMMY_PROC_ID
           
 
Constructor Summary
MasterProcess()
          Construct a new MasterProcess where messages are delivered without delay and are never lost.
MasterProcess(NetSimulator netsim)
          Construct a new MasterProcess with the specified network simulator.
 
Method Summary
 long getParallelElapsedTime()
           
 int[] getReceiveCounters(int id)
           
 int[] getSendCounters(int id)
           
 long getTotalElapsedTime()
           
 long getTotalIdleTime()
           
 long getTotalProcessingTime()
           
 boolean isDone()
           
 java.util.List<DProcess<M>> processes()
           
 void run()
          Run the distributed algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
See Also:
Constant Field Values

DUMMY_PROC_ID

public static final int DUMMY_PROC_ID
See Also:
Constant Field Values
Constructor Detail

MasterProcess

public MasterProcess()
Construct a new MasterProcess where messages are delivered without delay and are never lost.


MasterProcess

public MasterProcess(NetSimulator netsim)
Construct a new MasterProcess with the specified network simulator.

Parameters:
netsim - The network simulator.
Method Detail

run

public void run()
Run the distributed algorithm.


isDone

public boolean isDone()

getParallelElapsedTime

public long getParallelElapsedTime()

getTotalProcessingTime

public long getTotalProcessingTime()

getTotalElapsedTime

public long getTotalElapsedTime()

getTotalIdleTime

public long getTotalIdleTime()

getSendCounters

public int[] getSendCounters(int id)

getReceiveCounters

public int[] getReceiveCounters(int id)

processes

public java.util.List<DProcess<M>> processes()