Ejemplo n.º 1
0
        private void TrySendingViewRequestToFirstAvailableServer(Cluster cluster, HttpCommand httpCommand, string keyHintForSelectingServer)
        {
            //We are going to use the key hint to help destribute which server should be getting the requests.
            if (!string.IsNullOrEmpty(keyHintForSelectingServer))
            {
                int vBucketId;
                var server = cluster.GetServer(keyHintForSelectingServer, out vBucketId);
                if (server.TrySend(httpCommand))
                {
                    return;
                }
            }

            TrySendViewRequestToFirstAvailableServer(cluster, httpCommand);
        }