public static RedisInstanceOperation SlaveTo(RedisInstance instance, RedisInstance newMaster) => new RedisInstanceOperation { Command = InstanceCommandType.SlaveTo, Instance = instance, NewMaster = newMaster };
public bool Equals(RedisInstance other) { if (other == null) { return(false); } return(Host == other.Host && Port == other.Port); }
public RedisAnalyzer(RedisInstance instance) { Instance = instance; KeyMatchers = instance.ConnectionInfo.Settings.AnalysisRegexes .Where(r => r.Value.HasValue()) .Select(r => new KeyMatcher { Name = r.Key, Regex = new Regex(r.Value, RegexOptions.Compiled) }) .ToList(); KeyMatchers.Add(new KeyMatcher { Name = "Other (unrecognized)", Regex = new Regex(".", RegexOptions.Compiled) }); }
public RedisInstance GetServer() { return(RedisInstance.Get(Port, IPAddress)); }
public static RedisInstanceOperation MakeMaster(RedisInstance instance) => new RedisInstanceOperation { Command = InstanceCommandType.MakeMaster, Instance = instance };