Class ActionResourceLockLinear

java.lang.Object
edu.tufts.hrilab.action.lock.ActionResourceLock
edu.tufts.hrilab.action.lock.ActionResourceLockLinear
All Implemented Interfaces:
Serializable

public class ActionResourceLockLinear extends ActionResourceLock
ActionResourceLockLinear implements FCFS locks--no preemption based on priority.
See Also:
  • Constructor Details

    • ActionResourceLockLinear

      public ActionResourceLockLinear(String name)
      Constructor for a resource lock.
      Parameters:
      name - the lock's name
  • Method Details

    • acquire

      public boolean acquire(ActionInterpreter actionInt, int count)
      Make count attempts to acquire this resource lock.
      Specified by:
      acquire in class ActionResourceLock
      Parameters:
      actionInt - the ActionInterpreter requesting the lock
      count - the maximum number of attempts to acquire the lock
      Returns:
      true if the lock is successfully acquired, false otherwise
    • initResources

      public static void initResources()