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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCrashNode
(int crashType) Add a crash to the network.void
exit()
Shut down the network.void
start
(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.
-