NiFi Developer's Guide
Also available as:
PDF
loading table of contents...

Responding to Changes in Configuration

It is sometimes desirable to have a Processor eagerly react when its properties are changed. The onPropertyModified method allows a Processor to do just that. When a user changes the property values for a Processor, the onPropertyModified method will be called for each modified property. The method takes three arguments: the PropertyDescriptor that indicates which property was modified, the old value, and the new value. If the property had no previous value, the second argument will be null. If the property was removed, the third argument will be null. It is important to note that this method will be called regardless of whether or not the values are valid. This method will be called only when a value is actually modified, rather than being called when a user updates a Processor without changing its value. At the point that this method is invoked, it is guaranteed that the thread invoking this method is the only thread currently executing code in the Processor, unless the Processor itself creates its own threads.