public class WriteAheadLocalStateProvider extends AbstractStateProvider
Constructor and Description |
---|
WriteAheadLocalStateProvider() |
Modifier and Type | Method and Description |
---|---|
void |
clear(java.lang.String componentId)
Removes all values from the component's state that is stored using the given scope
|
StateMap |
getState(java.lang.String componentId)
Returns the currently configured state for the component.
|
java.util.List<PropertyDescriptor> |
getSupportedPropertyDescriptors()
Allows subclasses to register which property descriptor objects are
supported.
|
Scope[] |
getSupportedScopes()
Provides a listing of
Scope s supported by the StateProvider |
void |
init(StateProviderInitializationContext context) |
void |
onComponentRemoved(java.lang.String componentId)
This method is called whenever a component is removed from the NiFi instance.
|
boolean |
replace(StateMap oldValue,
java.util.Map<java.lang.String,java.lang.String> newValue,
java.lang.String componentId)
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(java.util.Map<java.lang.String,java.lang.String> state,
java.lang.String componentId)
Updates the value of the component's state, setting the new value to the
given state
|
void |
shutdown()
Shuts down the StateProvider and cleans up any resources held by it.
|
disable, enable, getIdentifier, initialize, isEnabled
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
public void init(StateProviderInitializationContext context) throws java.io.IOException
init
in class AbstractStateProvider
java.io.IOException
public java.util.List<PropertyDescriptor> getSupportedPropertyDescriptors()
AbstractConfigurableComponent
getSupportedPropertyDescriptors
in class AbstractConfigurableComponent
public void shutdown()
StateProvider
StateProvider.initialize(StateProviderInitializationContext)
method.public StateMap getState(java.lang.String componentId) throws java.io.IOException
StateProvider
componentId
- the id of the component for which state is to be retrievedjava.io.IOException
- if unable to communicate with the underlying storage mechanismpublic void setState(java.util.Map<java.lang.String,java.lang.String> state, java.lang.String componentId) throws java.io.IOException
StateProvider
state
- the value to change the state tocomponentId
- the id of the component for which state is being setjava.io.IOException
- if unable to communicate with the underlying storage mechanismpublic boolean replace(StateMap oldValue, java.util.Map<java.lang.String,java.lang.String> newValue, java.lang.String componentId) throws java.io.IOException
StateProvider
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 oldValuecomponentId
- the id of the component for which state is being retrievedtrue
if the state was updated to the new value, false
if the state's value was not
equal to oldValuejava.io.IOException
- if unable to communicate with the underlying storage mechanismpublic void clear(java.lang.String componentId) throws java.io.IOException
StateProvider
componentId
- the id of the component for which state is being clearedjava.io.IOException
- if unable to communicate with the underlying storage mechanismpublic void onComponentRemoved(java.lang.String componentId) throws java.io.IOException
StateProvider
componentId
- the ID of the component that was added to the NiFi instancejava.io.IOException
- if unable to perform the necessary cleanuppublic Scope[] getSupportedScopes()
StateProvider
Scope
s supported by the StateProviderScope
s supported by the configuration