Package io.pravega.common.util
Class BlockingAsyncIterator<T>
- java.lang.Object
-
- io.pravega.common.util.BlockingAsyncIterator<T>
-
- All Implemented Interfaces:
java.util.Iterator<T>
@ThreadSafe public class BlockingAsyncIterator<T> extends java.lang.Object implements java.util.Iterator<T>This class is a wrapper over async iterator that implements java.util.Iterator interface. This is blocking wrapper on async iterator's getNext method which implements blocking hasNext and next methods of iterator interface. This class is threadsafe but that has the drawback of blocking on asyncIterator's getNext within a lock.
-
-
Constructor Summary
Constructors Constructor Description BlockingAsyncIterator(AsyncIterator<T> asyncIterator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Tnext()
-
-
-
Constructor Detail
-
BlockingAsyncIterator
public BlockingAsyncIterator(AsyncIterator<T> asyncIterator)
-
-