@OnPrimaryNodeStateChange

The @OnPrimaryNodeStateChange annotation causes a method to be invoked as soon as the state of the Primary Node in a cluster has changed. Methods with this annotation should take either no arguments or one argument of type PrimaryNodeState. The PrimaryNodeState provides context about what changed so that the component can take appropriate action. The PrimaryNodeState enumerator has two possible values: ELECTED_PRIMARY_NODE (the node receiving this state has been elected the Primary Node of the NiFi cluster), or PRIMARY_NODE_REVOKED (the node receiving this state was the Primary Node but has now had its Primary Node role revoked).