public class RestartingQueueItemProvider<Q> extends java.lang.Object implements QueueItemProvider<Q>
| Constructor and Description |
|---|
RestartingQueueItemProvider(long restartDelayMs,
com.google.common.base.Supplier<QueueItemProvider<Q>> quipSupplier) |
public RestartingQueueItemProvider(long restartDelayMs,
com.google.common.base.Supplier<QueueItemProvider<Q>> quipSupplier)
restartDelayMs - When a received QueueItemProvider ceases producing elements, how long the next call to
next() will block in milliseconds before grabbing a new one from the supplier.quipSupplier - that returns a working QueueItemProvider for each Supplier.get().public java.util.Iterator<java.util.Collection<Q>> iterator()
QueueItemProviderthis. 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 QueueItemProvider<Q>iterator in interface java.lang.Iterable<java.util.Collection<Q>>public boolean hasNext()
hasNext in interface java.util.Iterator<java.util.Collection<Q>>public java.util.Collection<Q> next()
next in interface java.util.Iterator<java.util.Collection<Q>>public void remove()
remove in interface java.util.Iterator<java.util.Collection<Q>>