Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions src/main/java/org/apache/nifi/processor/ProcessSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,20 @@ default void commitAsync(Runnable onSuccess) {
*/
void adjustCounter(String name, long delta, boolean immediate);

/**
* Adjust measurement value for the named Counter, registering the named Counter when not present in the system.
* The default implementation provides compatibility with earlier interface versions but ignores the attributes
*
* @param name Counter name to update or register
* @param delta Measure value delta to record
* @param attributes Map of keys and values associated with the Counter may be empty but not null
* @param commitTiming Timing for when the measurement value should be committed
*/
default void adjustCounter(String name, long delta, Map<String, String> attributes, CommitTiming commitTiming) {
final boolean immediate = CommitTiming.NOW == commitTiming;
adjustCounter(name, delta, immediate);
}

/**
* Record measurement value for the named Gauge, registering the named Gauge when not present in the system.
* Gauges represent a measurement at a point in time, unlike counters that track cumulative values.
Expand All @@ -267,6 +281,20 @@ default void recordGauge(String name, double value, CommitTiming commitTiming) {

}

/**
* Record measurement value for the named Gauge, registering the named Gauge when not present in the system.
* Gauges represent a measurement at a point in time, unlike counters that track cumulative values.
* The default implementation provides compatibility with earlier interface versions but ignores the attributes
*
* @param name Gauge name to update or register
* @param value Measurement value to record
* @param attributes Map of keys and values associated with the Gauge may be empty but not null
* @param commitTiming Timing for when the measurement value should be committed
*/
default void recordGauge(String name, double value, Map<String, String> attributes, CommitTiming commitTiming) {
recordGauge(name, value, commitTiming);
}

/**
* Returns the {@link FlowFile} from the work queue that is next highest priority to process.
* If no FlowFiles are available, returns {@code null}.
Expand Down