Skip to content

Commit

Permalink
Add configurable lifetime to publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
arcticwaters committed Apr 6, 2014
1 parent ac1c7a9 commit f7ab2d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/main/java/info/ganglia/gmetric4j/Publisher.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ void publish( String processName, String attributeName,
throws GangliaException;

void publish( String processName, String attributeName,
String value, GMetricType type, GMetricSlope slope, int delay, String units )
String value, GMetricType type, GMetricSlope slope, int delay,
int lifetime, String units )
throws GangliaException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@ public GMetricPublisher( GMetric gm ) {

public void publish(String processName, String attributeName, String value,
GMetricType type, GMetricSlope slope, String units) throws GangliaException {
gm.announce(attributeName, value, type, units,
slope, 60, 0, processName);
publish(processName, attributeName, value, type, slope, 60, 0, units);
}

@Override
public void publish(String processName, String attributeName, String value,
GMetricType type, GMetricSlope slope, int delay, String units)
GMetricType type, GMetricSlope slope, int delay, int lifetime, String units)
throws GangliaException {
gm.announce(attributeName, value, type, units,
slope, delay, 0, processName);
slope, delay, lifetime, processName);
}

}

0 comments on commit f7ab2d4

Please sign in to comment.