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
This commit is contained in:
Bryan Duxbury 2011-07-13 21:17:26 +00:00
parent 11dfc8bb73
commit 4e98a258b2

View File

@ -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_;
}