Package org.apache.spark.sql.streaming
Interface ValueState<S>
- All Superinterfaces:
Serializable
Interface used for arbitrary stateful operations with the v2 API to capture single value state.
-
Method Summary
-
Method Details
-
clear
void clear()Remove this state. -
exists
boolean exists()Whether state exists or not. -
get
Get the state value if it exists- Returns:
- (undocumented)
- Throws:
NoSuchElementException
- if the state does not exist
-
getOption
scala.Option<S> getOption()Get the state if it exists as an option and None otherwise -
update
Update the value of the state.- Parameters:
newState
- the new value
-