Package com.surrealdb
Class LiveStream
java.lang.Object
com.surrealdb.LiveStream
- All Implemented Interfaces:
AutoCloseable
Blocking iterator over live query notifications. Call
next() in a
loop and close() when done. Implements AutoCloseable for
use in try-with-resources.-
Method Details
-
next
Blocks until the next notification is available, or the stream ends.- Returns:
- the next notification, or empty if the stream has ended
-
close
public void close()Releases the live query and stops receiving notifications. Idempotent.- Specified by:
closein interfaceAutoCloseable
-