nl.tudelft.ewi.alg.distsim
Class MasterProcess<M>
java.lang.Object
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.
DProcess
es require a master process to register with.
- Author:
- Léon Planken, James Boerkoel Jr.
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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.
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()