java.lang.Object
org.palladiosimulator.protocom.framework.java.se.strategies.PassiveResource

public class PassiveResource extends Object
Simulates passive resource usage with semaphores.
  • Constructor Details

    • PassiveResource

      public PassiveResource(int capacity, String type)
      Initializes a resource pool with given capacity.
      Parameters:
      capacity - pool size
      type - name of resource type
  • Method Details

    • acquire

      public void acquire()
      Acquires one resource of this type. Blocks if the current pool is exhausted.
    • release

      public void release()
      Releases one resource of ths type.
    • getType

      public String getType()