src/Orleans.Core/Messaging/GatewayManager.cs
/// <summary>
/// Selects a gateway to use for a new bucket.
///
/// Note that if a list provider delegate was given, the delegate is invoked every time this method is called.
/// This method performs caching to avoid hammering the ultimate data source.
///
/// This implementation does a simple round robin selection. It assumes that the gateway list from the provider
/// is in the same order every time.
/// </summary>
/// <returns></returns>
Selects a gateway to use for a new bucket.

Note that if a list provider delegate was given, the delegate is invoked every time this method is called.
This method performs caching to avoid hammering the ultimate data source.

This implementation does a simple round robin selection. It assumes that the gateway list from the provider
is in the same order every time.
Selects a gateway to use for a new bucket . Note that if a list provider delegate was given the delegate is invoked every time this method is called . This method performs caching to avoid hammering the ultimate data source . This implementation does a simple round robin selection . It assumes that the gateway list from the provider is in the same order every time .
public SiloAddress GetLiveGateway()
        {
            List<SiloAddress> live = GetLiveGateways();
            int count = live.Count;
            if (count > 0)
            {
                lock (lockable)
                {
                    roundRobinCounter = (roundRobinCounter + 1) % count;
                    return live[roundRobinCounter];
                }
            }
            return null;
        }
public SiloAddress GetLiveGateway ( ) { List < SiloAddress > live = GetLiveGateways ( ) ; int count = live . Count ; if ( count > 0 ) { lock ( lockable ) { roundRobinCounter = ( roundRobinCounter + 1 ) % count ; return live [ roundRobinCounter ] ; } } return null ; }
Selects a gateway to use for a new bucket.
Selects a gateway to use for a new bucket .
// Round-robin through the known gateways and take the next live one, starting from where we last left off // If we drop through, then all of the known gateways are presumed dead
None