public override bool Equals(object genericRight) { if (genericRight is CounterGroupBase <object> ) { CounterGroupBase <C> right = (CounterGroupBase <C>)genericRight; return(Iterators.ElementsEqual(GetEnumerator(), right.GetEnumerator())); } return(false); }
// All the group impls need this for legacy group interface internal static long GetCounterValue(CounterGroupBase <Counters.Counter> group, string counterName) { Counters.Counter counter = group.FindCounter(counterName, false); if (counter != null) { return(counter.GetValue()); } return(0L); }
public override bool Equals(object genericRight) { lock (this) { if (genericRight is CounterGroupBase <object> ) { CounterGroupBase <Counters.Counter> right = ((CounterGroupBase <Counters.Counter>)genericRight ).GetUnderlyingGroup(); return(Iterators.ElementsEqual(GetEnumerator(), right.GetEnumerator())); } return(false); } }
public virtual void IncrAllCounters(CounterGroupBase <C> other) { if (Preconditions.CheckNotNull(other.GetUnderlyingGroup(), "other group") is FileSystemCounterGroup <object> ) { foreach (Counter counter in other) { FileSystemCounterGroup.FSCounter c = (FileSystemCounterGroup.FSCounter)((Counter) counter).GetUnderlyingCounter(); FindCounter(c.scheme, c.key).Increment(counter.GetValue()); } } }
public virtual void IncrAllCounters(CounterGroupBase <C> other) { if (Preconditions.CheckNotNull(other, "other counter group") is FrameworkCounterGroup <object, object> ) { foreach (Counter counter in other) { C c = FindCounter(((FrameworkCounterGroup.FrameworkCounter)counter).key.Name()); if (c != null) { c.Increment(counter.GetValue()); } } } }
public virtual void IncrAllCounters(CounterGroupBase <T> rightGroup) { try { foreach (Counter right in rightGroup) { Counter left = FindCounter(right.GetName(), right.GetDisplayName()); left.Increment(right.GetValue()); } } catch (LimitExceededException e) { counters.Clear(); throw; } }
public virtual void IncrAllCounters(CounterGroupBase <Counters.Counter> rightGroup ) { realGroup.IncrAllCounters(rightGroup); }
internal Group(Counters.FrameworkGroupImpl group) { this.realGroup = group; }
internal Group(Counters.FSGroupImpl group) { this.realGroup = group; }
internal Group(Counters.GenericGroup group) { this.realGroup = group; }
protected internal Group() { realGroup = null; }