public interface QueueItemProvider<Q>
extends java.util.Iterator<java.util.Collection<Q>>, java.lang.Iterable<java.util.Collection<Q>>
QueueReader.
Note that the QueueReader actually accepts any Iterable<Collection<Q>> provider, so this is
useful more as a marker interface.| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
java.util.Iterator<java.util.Collection<Q>> |
iterator()
Generally returns
this. |
java.util.Collection<Q> |
next() |
void |
remove()
A means to delete the message because it is done or should not be processed again.
|
boolean hasNext()
hasNext in interface java.util.Iterator<java.util.Collection<Q>>QueueReader should continue processing messages from this provider.java.util.Collection<Q> next()
next in interface java.util.Iterator<java.util.Collection<Q>>null. The reading QueueReader may sleep after receiving an empty batch depending on its
configuration.void remove()
remove in interface java.util.Iterator<java.util.Collection<Q>>java.util.Iterator<java.util.Collection<Q>> iterator()
this. QueueItemProviders are not generally reusable/resettable since the
underlying message source will often not be reversible. Mashing the two interfaces together simplifies
implementations a bit, and also supports any typical Iterable usage.iterator in interface java.lang.Iterable<java.util.Collection<Q>>