Skip to content

Commit

Permalink
Include buffered property in StatsdProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
shakuzen committed Apr 10, 2019
1 parent 7c3501a commit 3e270c7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ public class StatsdProperties {
*/
private boolean publishUnchangedMeters = true;

/** Whether measurements should be buffered before sending to the StatsD server. */
private boolean buffered = true;

public boolean isEnabled() {
return this.enabled;
}
Expand Down Expand Up @@ -136,4 +139,11 @@ public void setPublishUnchangedMeters(boolean publishUnchangedMeters) {
this.publishUnchangedMeters = publishUnchangedMeters;
}

public boolean isBuffered() {
return buffered;
}

public void setBuffered(boolean buffered) {
this.buffered = buffered;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,8 @@ public boolean publishUnchangedMeters() {
return get(StatsdProperties::isPublishUnchangedMeters, StatsdConfig.super::publishUnchangedMeters);
}

@Override
public boolean buffered() {
return get(StatsdProperties::isBuffered, StatsdConfig.super::buffered);
}
}

0 comments on commit 3e270c7

Please sign in to comment.