Package modelarium.multithreading
Class CoordinatorThread
java.lang.Object
modelarium.multithreading.CoordinatorThread
- All Implemented Interfaces:
Runnable
Coordinator thread responsible for managing synchronised access to shared simulation state
between multiple worker threads in a parallel simulation.
This class listens to the request queue and uses CoordinatorRequestHandler
to respond to agent/environment-related queries or updates.
-
Constructor Summary
ConstructorsConstructorDescriptionCoordinatorThread(String name, ModelSettings settings, Environment environment, RequestResponseController requestResponseController) Constructs the coordinator thread with required references.CoordinatorThread(String name, ModelSettings settings, Environment environment, RequestResponseController requestResponseController, AgentSet globalAgentSet) Constructs the coordinator thread with required references. -
Method Summary
-
Constructor Details
-
CoordinatorThread
public CoordinatorThread(String name, ModelSettings settings, Environment environment, RequestResponseController requestResponseController) Constructs the coordinator thread with required references.- Parameters:
name- the thread name or IDsettings- global model settingsenvironment- the shared simulation environmentrequestResponseController- the controller managing request/response queues
-
CoordinatorThread
public CoordinatorThread(String name, ModelSettings settings, Environment environment, RequestResponseController requestResponseController, AgentSet globalAgentSet) Constructs the coordinator thread with required references.- Parameters:
name- the thread name or IDsettings- global model settingsenvironment- the shared simulation environmentrequestResponseController- the controller managing request/response queuesglobalAgentSet- the global agent set for the whole model
-
-
Method Details