Package org.frankframework.receivers
Class ResourceLimiter
java.lang.Object
java.util.concurrent.Semaphore
org.frankframework.receivers.ResourceLimiter
- All Implemented Interfaces:
Serializable
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
void
increaseMaxResourceCount
(int addition) void
reduceMaxResourceCount
(int reduction) Methods inherited from class java.util.concurrent.Semaphore
acquire, acquire, acquireUninterruptibly, acquireUninterruptibly, availablePermits, drainPermits, getQueuedThreads, getQueueLength, hasQueuedThreads, isFair, reducePermits, release, release, toString, tryAcquire, tryAcquire, tryAcquire, tryAcquire
-
Constructor Details
-
ResourceLimiter
public ResourceLimiter(int permits)
-
-
Method Details
-
increaseMaxResourceCount
public void increaseMaxResourceCount(int addition) -
reduceMaxResourceCount
public void reduceMaxResourceCount(int reduction) -
getMaxResourceLimit
public int getMaxResourceLimit()
-