|Constructor and Description|
|Modifier and Type||Method and Description|
Waits up to the timeout to return the next element.
close, hasNext, next, remove
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public boolean isExhausted()
trueiff this iterator will not visit any more elements (non-blocking).
public boolean hasNext(long timeout, TimeUnit unit) throws InterruptedException
trueiff there is at least one element that can be visited. If the buffer is empty then this will block until: (a) an element appears in the buffer; (b) the buffer is
BlockingBuffer.close()ed; or (c) the timeout expires.
Note that a
false return DOES NOT signify that the iterator
is exhausted. However, if you specify an infinite timeout using
TimeUnit.SECONDS then you MAY safely
false return as an indication that the iterator
timeout- The length of time that the method may block awaiting an element to appear.
unit- The units in which the timeout is expressed.
trueiff there is an element available.
InterruptedException- if the current thread is interrupted while waiting another element.
public E next(long timeout, TimeUnit unit) throws InterruptedException
timeout- The timeout (overrides the chunkTimeout specified to the
unit- The unit in which the timeout is expressed.
nulliff the timeout was exceeded before
InterruptedException- if the current thread is interrupted while waiting for another element.
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.