Class NopStateManager
java.lang.Object
org.apache.nifi.documentation.init.NopStateManager
- All Implemented Interfaces:
StateManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears all keys and values from the component's stateReturns the current state for the component.booleanUpdates 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.voidUpdates the value of the component's state, setting it to given value
-
Constructor Details
-
NopStateManager
public NopStateManager()
-
-
Method Details
-
setState
Description copied from interface:StateManagerUpdates the value of the component's state, setting it to given value- Specified by:
setStatein interfaceStateManager- Parameters:
state- the value to change the state toscope- the scope to use when storing the state
-
getState
Description copied from interface:StateManagerReturns 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:
getStatein interfaceStateManager- Parameters:
scope- the scope to use when fetching the state- Returns:
- the current state for the component
-
replace
Description copied from interface:StateManagerUpdates 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:
replacein 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:
trueif the state was updated to the new value,falseif the state's value was not equal to oldValue
-
clear
Description copied from interface:StateManagerClears all keys and values from the component's state- Specified by:
clearin interfaceStateManager- Parameters:
scope- the scope whose values should be cleared
-