Class PassiveResource
java.lang.Object
org.palladiosimulator.protocom.framework.java.se.strategies.PassiveResource
Simulates passive resource usage with semaphores.
-
Constructor Summary
ConstructorDescriptionPassiveResource
(int capacity, String type) Initializes a resource pool with given capacity. -
Method Summary
-
Constructor Details
-
PassiveResource
Initializes a resource pool with given capacity.- Parameters:
capacity
- pool sizetype
- 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
-