summaryrefslogtreecommitdiff
path: root/contrib/fb303
diff options
context:
space:
mode:
authorBryan Duxbury <bryanduxbury@apache.org>2011-07-13 21:17:26 +0000
committerBryan Duxbury <bryanduxbury@apache.org>2011-07-13 21:17:26 +0000
commit4e98a258b246d3c17469ab54beb725fb738053e2 (patch)
tree669777f8e612587f179e2afff2f724f56a42d022 /contrib/fb303
parent11dfc8bb730e6d9813117cde312f1b8abbeefa36 (diff)
downloadthrift-4e98a258b246d3c17469ab54beb725fb738053e2.tar.gz
THRIFT-1237. contrib: Java fb303 missing some methods
Added counters to FacebookBase. Patch: Ionel Corneliu Gog git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1146484 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'contrib/fb303')
-rw-r--r--contrib/fb303/java/src/FacebookBase.java11
1 files changed, 11 insertions, 0 deletions
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<String,Long> getCounters() {
return counters_;
}