Class ThrottleLimitResultQueue<T>
java.lang.Object
org.springframework.batch.repeat.support.ThrottleLimitResultQueue<T>
An implementation of the
ResultQueue
that throttles the number of
expected results, limiting it to a maximum at any given time.- Author:
- Dave Syer
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ThrottleLimitResultQueue
public ThrottleLimitResultQueue(int throttleLimit) - Parameters:
throttleLimit
- the maximum number of results that can be expected at any given time.
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
isExpecting
public boolean isExpecting() -
expect
Tell the queue to expect one more result. Blocks until a new result is available if already expecting too many (as determined by the throttle limit).- Throws:
InterruptedException
- See Also:
-
ResultQueue.expect()
-
put
- Throws:
IllegalArgumentException
-
take
-