Ejemplo n.º 1
0
        /// <summary>
        /// This method corresponds to the "stats" command in the memcached protocol.
        /// It will send the stats command to all servers, and it will return a Dictionary for each server
        /// containing the results of the command.
        /// </summary>
        public Dictionary <string, Dictionary <string, string> > Stats()
        {
            Dictionary <string, Dictionary <string, string> > results = new Dictionary <string, Dictionary <string, string> >();

            if (memcachedProvider == null)
            {
                ConnectionError();
                return(results);
            }
            try
            {
                OperationResult             stats    = memcachedProvider.GetStatistics("");
                var                         ht       = (Hashtable)stats.Value;
                Dictionary <string, string> statsDic = new Dictionary <string, string>();
                foreach (DictionaryEntry entry in ht)
                {
                    statsDic.Add(entry.Key.ToString(), entry.Value.ToString());
                }
                results.Add("127.0.0.1", statsDic);
            }
            catch (Exception)
            { }
            return(results);
        }
Ejemplo n.º 2
0
 public override void Execute(IMemcachedProvider cacheProvider)
 {
         _result = cacheProvider.GetStatistics(_argument);
 }
Ejemplo n.º 3
0
 public override void Execute(IMemcachedProvider cacheProvider)
 {
     _result = cacheProvider.GetStatistics(_argument);
 }