示例#1
0
        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));
        }
示例#2
0
 public virtual long InvocationCount(TimerName name)
 {
     return(_counts.getOrDefault(name.Name(), 0L));
 }