类 ThrottleLimitResultQueue<T>
- java.lang.Object
- org.springframework.batch.repeat.support.ThrottleLimitResultQueue<T>
public class ThrottleLimitResultQueue<T> extends java.lang.Object
An implementation of theResultQueue
that throttles the number of expected results, limiting it to a maximum at any given time.- 作者:
- Dave Syer
构造器概要
构造器 构造器 说明 ThrottleLimitResultQueue(int throttleLimit)
构造器详细资料
ThrottleLimitResultQueue
public ThrottleLimitResultQueue(int throttleLimit)
- 参数:
throttleLimit
- the maximum number of results that can be expected at any given time.
方法详细资料
isEmpty
public boolean isEmpty()
isExpecting
public boolean isExpecting()
expect
public void expect() throws java.lang.InterruptedException
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).- 抛出:
java.lang.InterruptedException
- 另请参阅:
ResultQueue.expect()
put
public void put(T holder) throws java.lang.IllegalArgumentException
- 抛出:
java.lang.IllegalArgumentException