Class TrackActiveTasksStrategy

java.lang.Object
org.mpi_sws.jmc.strategies.TrackActiveTasksStrategy
All Implemented Interfaces:
SchedulingStrategy
Direct Known Subclasses:
RandomSchedulingStrategy, TrustStrategy

public abstract class TrackActiveTasksStrategy extends Object implements SchedulingStrategy
A strategy that tracks the active tasks.
  • Constructor Details

    • TrackActiveTasksStrategy

      public TrackActiveTasksStrategy()
      Constructs a new TrackActiveTasksStrategy object.
    • TrackActiveTasksStrategy

      public TrackActiveTasksStrategy(List<TrackActiveTasksStrategy.Tracker> trackers)
      Constructs a new TrackActiveTasksStrategy object with the given trackers.
  • Method Details

    • initIteration

      public void initIteration(int iteration, JmcModelCheckerReport report)
      Description copied from interface: SchedulingStrategy
      Initializes the strategy for a new iteration.
      Specified by:
      initIteration in interface SchedulingStrategy
      Parameters:
      iteration - the number of the iteration.
    • updateEvent

      public void updateEvent(JmcRuntimeEvent event)
      Description copied from interface: SchedulingStrategy
      Updates the strategy with the event that has occurred.

      May be left empty if unused

      Specified by:
      updateEvent in interface SchedulingStrategy
    • resetIteration

      public void resetIteration(int iteration)
      Description copied from interface: SchedulingStrategy
      Resets the strategy for the current Iteration.
      Specified by:
      resetIteration in interface SchedulingStrategy
    • teardown

      public void teardown()
      Description copied from interface: SchedulingStrategy
      Teardown the strategy. Allows for releasing resources.
      Specified by:
      teardown in interface SchedulingStrategy
    • isActive

      protected Boolean isActive(Long threadId)
      Returns whether the given thread is active.
      Parameters:
      threadId - the thread ID
      Returns:
      whether the given thread is active
    • getActiveTasks

      protected Set<Long> getActiveTasks()
      Returns the set of active tasks.
      Returns:
      the set of active tasks
    • markActive

      protected void markActive(Long threadId)
      Marks the given thread as active.
      Parameters:
      threadId - the thread ID
    • markInactive

      protected void markInactive(Long threadId)
      Marks the given thread as inactive.
      Parameters:
      threadId - the thread ID