public override Timer Create(TimerName name, Group group, TimeoutHandler handler) { TimeoutHandler countingHandler = timer => { long count = _counts.getOrDefault(name.Name(), 0L); _counts[name.Name()] = count + 1; handler(timer); }; return(base.Create(name, group, countingHandler)); }
public virtual long InvocationCount(TimerName name) { return(_counts.getOrDefault(name.Name(), 0L)); }