Expression Language
Also available as:
PDF

nextInt

Description: Returns a one-up value (starting at 0) and increasing over the lifetime of the running instance of NiFi. This value is not persisted across restarts and is not guaranteed to be unique across a cluster. This value is considered "one-up" in that if called multiple times across the NiFi instance, the values will be sequential. However, this counter is shared across all NiFi components, so calling this function multiple times from one Processor will not guarantee sequential values within the context of a particular Processor.

Subject Type: No Subject

Arguments: No arguments

Return Type: Number

Examples: If the previous value returned by nextInt was 5, the Expression ${nextInt():divide(2)} obtains the next available integer (6) and divides the result by 2, returning a value of 3.