Amazon.ElastiCacheCluster/DiscoveryNode.cs
/// <summary>
/// Finds the version of Memcached the Elasticache setup is running on
/// </summary>
/// <returns>Version of memcahced running on nodes</returns>
Finds the version of Memcached the Elasticache setup is running on
Finds the version of Memcached the Elasticache setup is running on
internal Version GetNodeVersion()
        {
            if (this.NodeVersion != null)
            {
                return this.NodeVersion;
            }
            if (!string.IsNullOrEmpty(this.Node.ToString()) && this.Node.ToString().Equals("TestingAWSInternal"))
            {
                this.NodeVersion = new Version("1.4.14");
                return this.NodeVersion;
            }
            IStatsOperation statcommand = new Enyim.Caching.Memcached.Protocol.Text.StatsOperation(null);
            var statresult = this.Node.Execute(statcommand);
            string version;
            if (statcommand.Result != null && statcommand.Result.TryGetValue("version", out version))
            {
                this.NodeVersion = new Version(version);
                return this.NodeVersion;
            }
            else
            {
                log.Error("Could not call stats on Node endpoint");
                throw new CommandNotSupportedException("The node does not have a version in stats.");
            }
        }
internal Version GetNodeVersion ( ) { if ( this . NodeVersion != null ) { return this . NodeVersion ; } if ( ! string . IsNullOrEmpty ( this . Node . ToString ( ) ) && this . Node . ToString ( ) . Equals ( " " ) ) { this . NodeVersion = new Version ( " " ) ; return this . NodeVersion ; } IStatsOperation statcommand = new Enyim . Caching . Memcached . Protocol . Text . StatsOperation ( null ) ; var statresult = this . Node . Execute ( statcommand ) ; string version ; if ( statcommand . Result != null && statcommand . Result . TryGetValue ( " " , out version ) ) { this . NodeVersion = new Version ( version ) ; return this . NodeVersion ; } else { log . Error ( " " ) ; throw new CommandNotSupportedException ( " " ) ; } }
Finds the version of Memcached the Elasticache setup is running on
Finds the version of Memcached the Elasticache setup is running on
Version of memcahced running on nodes
Version of memcahced running on nodes