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
Scopes 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, isEnabledcustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic void init(StateProviderInitializationContext context) throws java.io.IOException
init in class AbstractStateProviderjava.io.IOExceptionpublic java.util.List<PropertyDescriptor> getSupportedPropertyDescriptors()
AbstractConfigurableComponentgetSupportedPropertyDescriptors in class AbstractConfigurableComponentpublic void shutdown()
StateProviderStateProvider.initialize(StateProviderInitializationContext) method.public StateMap getState(java.lang.String componentId) throws java.io.IOException
StateProvidercomponentId - 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
StateProviderstate - 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
StateProvideroldValue - 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
StateProvidercomponentId - 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
StateProvidercomponentId - the ID of the component that was added to the NiFi instancejava.io.IOException - if unable to perform the necessary cleanuppublic Scope[] getSupportedScopes()
StateProviderScopes supported by the StateProviderScopes supported by the configuration