Class ResourceLimiter

java.lang.Object
java.util.concurrent.Semaphore
org.frankframework.receivers.ResourceLimiter
All Implemented Interfaces:
Serializable

public class ResourceLimiter extends Semaphore
ResourceLimiter for limiting the number of resources that can be used in parallel. Contains a maxResourceLimit that can be increased or decreased, separate from the actual permits. See Semaphore for generic details.
See Also:
  • Constructor Details

    • ResourceLimiter

      public ResourceLimiter(int permits)
    • ResourceLimiter

      public ResourceLimiter(int permits, boolean fair)
  • Method Details

    • increaseMaxResourceCount

      public void increaseMaxResourceCount(int addition)
    • reduceMaxResourceCount

      public void reduceMaxResourceCount(int reduction)
    • getMaxResourceLimit

      public int getMaxResourceLimit()
    • waitUntilAllResourcesAvailable

      public void waitUntilAllResourcesAvailable() throws InterruptedException
      Throws:
      InterruptedException