GetMaxUpdater() 공개 메소드

public GetMaxUpdater ( HystrixRollingNumberEvent type ) : LongMaxUpdater
type HystrixRollingNumberEvent
리턴 LongMaxUpdater
 public void AddBucket(Bucket lastBucket)
 {
     foreach (HystrixRollingNumberEvent type in HystrixRollingNumberEventHelper.Values)
     {
         if (HystrixRollingNumberEventHelper.IsCounter(type))
         {
             GetAdder(type).Add(lastBucket.GetAdder(type).Sum());
         }
         if (HystrixRollingNumberEventHelper.IsMaxUpdater(type))
         {
             GetMaxUpdater(type).Update(lastBucket.GetMaxUpdater(type).Max);
         }
     }
 }
예제 #2
0
            /// <summary>
            /// Updates the cumulative values by the values of a <see cref="Bucket"/>.
            /// </summary>
            /// <param name="lastBucket">The bucket to update with.</param>
            public void AddBucket(Bucket lastBucket)
            {
                foreach (HystrixRollingNumberEvent type in HystrixRollingNumberEventExtensions.Values)
                {
                    if (type.IsCounter())
                    {
                        this.GetAdder(type).Add(lastBucket.GetAdder(type).Sum());
                    }

                    if (type.IsMaxUpdater())
                    {
                        this.GetMaxUpdater(type).Update(lastBucket.GetMaxUpdater(type).Max());
                    }
                }
            }
예제 #3
0
        internal long GetValueOfLatestBucket(RollingNumberEvent ev)
        {
            Bucket lastBucket = GetCurrentBucket();

            if (lastBucket == null)
            {
                return(0);
            }
            // we have bucket data so we'll return the lastBucket
            if ((int)ev > (int)RollingNumberEvent.MAX_COUNTER)
            {
                return(lastBucket.GetMaxUpdater(ev));
            }
            else
            {
                return(lastBucket.GetAdder(ev));
            }
        }
예제 #4
0
            /// <summary>
            /// Updates the cumulative values by the values of a <see cref="Bucket"/>.
            /// </summary>
            /// <param name="lastBucket">The bucket to update with.</param>
            public void AddBucket(Bucket lastBucket)
            {
                foreach (RollingNumberEvent type in RollingNumberEventExtensions.Values)
                {
                    if (type.IsCounter())
                    {
                        this.GetAdder(type).Add(lastBucket.GetAdder(type).Sum());
                    }

                    if (type.IsMaxUpdater())
                    {
                        this.GetMaxUpdater(type).Update(lastBucket.GetMaxUpdater(type).Max());
                    }
                }
            }