diff --git a/contrib/fb303/java/src/FacebookBase.java b/contrib/fb303/java/src/FacebookBase.java index f84e98bb1..f8f26a318 100644 --- a/contrib/fb303/java/src/FacebookBase.java +++ b/contrib/fb303/java/src/FacebookBase.java @@ -64,6 +64,17 @@ public abstract class FacebookBase implements FacebookService.Iface { return val; } + public long incrementCounter(String key, long increment) { + long val = getCounter(key) + increment; + counters_.put(key, val); + return val; + } + + public long setCounter(String key, long value) { + counters_.put(key, value); + return value; + } + public AbstractMap getCounters() { return counters_; }