OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs
/// <summary>
/// Register drip rate requested by a child of this throttle. Pass the
/// changes up the hierarchy.
/// </summary>
Register drip rate requested by a child of this throttle. Pass the
changes up the hierarchy.
Register drip rate requested by a child of this throttle . Pass the changes up the hierarchy .
public void RegisterRequest(TokenBucket child, Int64 request)
        {
            lock (m_children)
            {
                m_children[child] = request;
                TotalDripRequest = 0;
                foreach (KeyValuePair<TokenBucket, Int64> cref in m_children)
                    TotalDripRequest += cref.Value;
            }
            if (Parent != null)
            {
                Int64 effectiveDripRate;
                if (RequestedDripRate > 0)
                    effectiveDripRate = Math.Min(RequestedDripRate, TotalDripRequest);
                else
                    effectiveDripRate = TotalDripRequest;
                Parent.RegisterRequest(this, effectiveDripRate);
            }
        }
public void RegisterRequest ( TokenBucket child , Int64 request ) { lock ( m_children ) { m_children [ child ] = request ; TotalDripRequest = 0 ; foreach ( KeyValuePair < TokenBucket , Int64 > cref in m_children ) TotalDripRequest += cref . Value ; } if ( Parent != null ) { Int64 effectiveDripRate ; if ( RequestedDripRate > 0 ) effectiveDripRate = Math . Min ( RequestedDripRate , TotalDripRequest ) ; else effectiveDripRate = TotalDripRequest ; Parent . RegisterRequest ( this , effectiveDripRate ) ; } }
Register drip rate requested by a child of this throttle.
Register drip rate requested by a child of this throttle .
// Pass the new values up to the parent
child
TokenBucket
request
Int64