Search in sources :

Example 1 with StandardStateManager

use of org.apache.nifi.controller.state.StandardStateManager in project nifi by apache.

the class StandardStateManagerProvider method getStateManager.

/**
 * Returns the State Manager that has been created for the given component ID, or <code>null</code> if none exists
 *
 * @return the StateManager that can be used by the component with the given ID, or <code>null</code> if none exists
 */
@Override
public synchronized StateManager getStateManager(final String componentId) {
    StateManager stateManager = stateManagers.get(componentId);
    if (stateManager != null) {
        return stateManager;
    }
    stateManager = new StandardStateManager(localStateProvider, clusterStateProvider, componentId);
    stateManagers.put(componentId, stateManager);
    return stateManager;
}
Also used : StandardStateManager(org.apache.nifi.controller.state.StandardStateManager) StateManager(org.apache.nifi.components.state.StateManager) StandardStateManager(org.apache.nifi.controller.state.StandardStateManager)

Aggregations

StateManager (org.apache.nifi.components.state.StateManager)1 StandardStateManager (org.apache.nifi.controller.state.StandardStateManager)1