Class NopStateManager
java.lang.Object
org.apache.nifi.documentation.init.NopStateManager
- All Implemented Interfaces:
StateManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears all keys and values from the component's stateReturns the current state for the component.boolean
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
Updates the value of the component's state, setting it to given value
-
Constructor Details
-
NopStateManager
public NopStateManager()
-
-
Method Details
-
setState
Description copied from interface:StateManager
Updates the value of the component's state, setting it to given value- Specified by:
setState
in interfaceStateManager
- Parameters:
state
- the value to change the state toscope
- the scope to use when storing the state
-
getState
Description copied from interface:StateManager
Returns the current state for the component. This return value will never benull
. If the state has not yet been set, the StateMap's version will be -1, and the map of values will be empty.- Specified by:
getState
in interfaceStateManager
- Parameters:
scope
- the scope to use when fetching the state- Returns:
- the current state for the component
-
replace
Description copied from interface:StateManager
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.- Specified by:
replace
in interfaceStateManager
- Parameters:
oldValue
- 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 state- Returns:
true
if the state was updated to the new value,false
if the state's value was not equal to oldValue
-
clear
Description copied from interface:StateManager
Clears all keys and values from the component's state- Specified by:
clear
in interfaceStateManager
- Parameters:
scope
- the scope whose values should be cleared
-