Package it.unitn.disi.ds1.qtop
Class Simulation
java.lang.Object
it.unitn.disi.ds1.qtop.Simulation
Simulation class layer between the UserInterface and the network.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCrashNode(int crashType) Add a crash to the network.voidexit()Shut down the network.voidstart(int numberOfNodes, int numberOfClients, int voteTimeout, int writeTimeout) Start the network with the given parameters.
-
Constructor Details
-
Simulation
public Simulation()Create a new simulation.
-
-
Method Details
-
start
public void start(int numberOfNodes, int numberOfClients, int voteTimeout, int writeTimeout) Start the network with the given parameters.- Parameters:
numberOfNodes- number of nodesnumberOfClients- number of clientsvoteTimeout- vote timeoutwriteTimeout- write timeout
-
addCrashNode
public void addCrashNode(int crashType) Add a crash to the network.- Parameters:
crashType- the type of crash
-
exit
public void exit()Shut down the network.
-