public class NopStateManager extends Object implements StateManager
| Constructor and Description |
|---|
NopStateManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear(Scope scope)
Clears all keys and values from the component's state
|
StateMap |
getState(Scope scope)
Returns the current state for the component.
|
boolean |
replace(StateMap oldValue,
Map<String,String> newValue,
Scope scope)
Updates the value of the component's state to the new value if and only if the value currently
is the same as the given oldValue.
|
void |
setState(Map<String,String> state,
Scope scope)
Updates the value of the component's state, setting it to given value
|
public void setState(Map<String,String> state, Scope scope)
StateManagersetState in interface StateManagerstate - the value to change the state toscope - the scope to use when storing the statepublic StateMap getState(Scope scope)
StateManagernull.
If the state has not yet been set, the StateMap's version will be -1, and the map of values will be empty.getState in interface StateManagerscope - the scope to use when fetching the statepublic boolean replace(StateMap oldValue, Map<String,String> newValue, Scope scope)
StateManagerreplace in interface StateManageroldValue - the old value to compare againstnewValue - the new value to use if and only if the state's value is the same as the given oldValuescope - the scope to use for storing the new statetrue if the state was updated to the new value, false if the state's value was not
equal to oldValuepublic void clear(Scope scope)
StateManagerclear in interface StateManagerscope - the scope whose values should be clearedCopyright © 2023 Apache NiFi Project. All rights reserved.