Package com.streambase.liveview.client
Interface SnapshotResult
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
DeleteQueryListener
,SnapshotQueryListener
A blocking iterator pattern for retrieving
snapshot only results.
- Since:
- 2.0 SnapshotResult extends Iterable<Tuple>
-
Method Details
-
hasNext
See if there are more tuples to retrieve. If there are not currently any Tuples waiting to be read, this will block until either the next Tuple or the Snapshot end arrives.- Returns:
- true if more tuples exist in result
- Throws:
LiveViewException
-
next
Retrieves the next tuple in the result. If there are not currently any Tuples waiting to be read, this will block until either the next Tuple or the Snapshot end arrives.- Returns:
- the next tuple
- Throws:
LiveViewException
- if exception occurs on the QueryNoSuchElementException
- if no more tuples exist to retrieve
-
getFields
Retrieves the fields describing the tuples that will be returned.- Returns:
- the fields describing the tuples
- Throws:
LiveViewException
- if exception occurs on the Query
-
close
void close()closes any resource associated with the snapshot result- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-