mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
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:
parent
11dfc8bb73
commit
4e98a258b2
@ -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_;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user