Enum Class RequestType

java.lang.Object
java.lang.Enum<RequestType>
modelarium.multithreading.requestresponse.RequestType
All Implemented Interfaces:
Serializable, Comparable<RequestType>, Constable

public enum RequestType extends Enum<RequestType>
Enum representing the different types of requests that can be sent between worker threads and the coordinator thread during synchronised simulation.
  • Enum Constant Details

    • ALL_WORKERS_FINISH_TICK

      public static final RequestType ALL_WORKERS_FINISH_TICK
      Indicates that a worker has completed its tick and is ready to synchronise with other workers before continuing.
    • ALL_WORKERS_UPDATE_COORDINATOR

      public static final RequestType ALL_WORKERS_UPDATE_COORDINATOR
      Indicates that a worker has updated the coordinator with its agent state and is waiting for others to do the same.
    • AGENT_ACCESS

      public static final RequestType AGENT_ACCESS
      Request to access a specific agent from another thread or core.
    • FILTERED_AGENTS_ACCESS

      public static final RequestType FILTERED_AGENTS_ACCESS
      Request to access a subset of agents based on a filter predicate.
    • ENVIRONMENT_ATTRIBUTES_ACCESS

      public static final RequestType ENVIRONMENT_ATTRIBUTES_ACCESS
      Request to retrieve the current state of the environment's attributes.
    • UPDATE_COORDINATOR_AGENTS

      public static final RequestType UPDATE_COORDINATOR_AGENTS
      Request to update the coordinator with the latest agent data from a worker thread.
    • SHUTDOWN

      public static final RequestType SHUTDOWN
      Request to shut the model down.
  • Method Details

    • values

      public static RequestType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RequestType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null