public interface Firehose extends Closeable
The implementation of this interface only needs to be minimally thread-safe. The three methods ##hasMore(), ##nextRow() and ##commit() are all called from the same thread. ##commit(), however, returns a callback which will be called on another thread, so the operations inside of that callback must be thread-safe.
| Modifier and Type | Method and Description | 
|---|---|
Runnable | 
commit()
Returns a runnable that will "commit" everything read up to the point at which commit() is called. 
 | 
boolean | 
hasMore()
Returns whether there are more rows to process. 
 | 
InputRow | 
nextRow()
The next row available. 
 | 
boolean hasMore()
@Nullable InputRow nextRow()
Runnable commit()
A simple implementation of this interface might do nothing when run() is called (in which case the same do-nothing instance can be returned every time), or a more complex implementation might clean up temporary resources that are no longer needed because of InputRows delivered by prior calls to ##nextRow().
Copyright © 2011–2018. All rights reserved.