Class NopStateManager

java.lang.Object
org.apache.nifi.documentation.init.NopStateManager
All Implemented Interfaces:
StateManager

public class NopStateManager extends Object implements StateManager
  • Constructor Details

    • NopStateManager

      public NopStateManager()
  • Method Details

    • setState

      public void setState(Map<String,String> state, Scope scope)
      Description copied from interface: StateManager
      Updates the value of the component's state, setting it to given value
      Specified by:
      setState in interface StateManager
      Parameters:
      state - the value to change the state to
      scope - the scope to use when storing the state
    • getState

      public StateMap getState(Scope scope)
      Description copied from interface: StateManager
      Returns the current state for the component. This return value will never be null. 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 interface StateManager
      Parameters:
      scope - the scope to use when fetching the state
      Returns:
      the current state for the component
    • replace

      public boolean replace(StateMap oldValue, Map<String,String> newValue, Scope scope)
      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 interface StateManager
      Parameters:
      oldValue - the old value to compare against
      newValue - the new value to use if and only if the state's value is the same as the given oldValue
      scope - 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

      public void clear(Scope scope)
      Description copied from interface: StateManager
      Clears all keys and values from the component's state
      Specified by:
      clear in interface StateManager
      Parameters:
      scope - the scope whose values should be cleared