|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.batch.repeat.support.ResultHolderResultQueue
public class ResultHolderResultQueue
An implementation of the ResultQueue
that throttles the number of
expected results, limiting it to a maximum at any given time.
Constructor Summary | |
---|---|
ResultHolderResultQueue(int throttleLimit)
|
Method Summary | |
---|---|
void |
expect()
Tell the queue to expect one more result. |
boolean |
isEmpty()
Used by master thread to verify that there are results available from take() without possibly having to block and wait. |
boolean |
isExpecting()
Check if any results are expected. |
void |
put(org.springframework.batch.repeat.support.ResultHolder holder)
Once it is expecting a result, clients call this method to satisfy the expectation. |
org.springframework.batch.repeat.support.ResultHolder |
take()
Get the next result as soon as it becomes available. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResultHolderResultQueue(int throttleLimit)
throttleLimit
- the maximum number of results that can be expected
at any given time.Method Detail |
---|
public boolean isEmpty()
take()
without possibly having to block and wait.
public boolean isExpecting()
public void expect() throws InterruptedException
InterruptedException
- if the call blocks and is then interrupted.ResultQueue.expect()
public void put(org.springframework.batch.repeat.support.ResultHolder holder) throws IllegalArgumentException
holder
- the result for later collection.
IllegalArgumentException
- if the queue is not expecting a new
resultpublic org.springframework.batch.repeat.support.ResultHolder take() throws NoSuchElementException, InterruptedException
ResultQueue
).
NoSuchElementException
- if there is no result expected
InterruptedException
- if the operation is interrupted while
waitingResultQueue.take()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |