Class TrackActiveTasksStrategy.TrackLocks

java.lang.Object
org.mpi_sws.jmc.strategies.TrackActiveTasksStrategy.TrackLocks
All Implemented Interfaces:
TrackActiveTasksStrategy.Tracker
Enclosing class:
TrackActiveTasksStrategy

public static class TrackActiveTasksStrategy.TrackLocks extends Object implements TrackActiveTasksStrategy.Tracker
Tracks the locks acquired and released events of tasks.
  • Constructor Details

    • TrackLocks

      public TrackLocks()
      Constructs a new TrackLocks object.
  • Method Details

    • updateEvent

      public Set<Long> updateEvent(JmcRuntimeEvent event)
      Updates based on lock acquire and release events.

      For every acquire event, if the lock is already acquired, the task is made to wait. Tracked in waitingTasks.

      If it is not yet acquired, it is put in wantingTasks and retained in active tasks.

      For every release event, the corresponding waiting tasks are marked as active.

      Specified by:
      updateEvent in interface TrackActiveTasksStrategy.Tracker
      Parameters:
      event - the event to update
      Returns:
      the set of active tasks
    • reset

      public void reset()
      Description copied from interface: TrackActiveTasksStrategy.Tracker
      Resets the tracker.
      Specified by:
      reset in interface TrackActiveTasksStrategy.Tracker