public static void AddRoleInfoEntry(string roleId, string ip, int port, bool isMaster) { RoleInfoDataSource rids = new RoleInfoDataSource(); rids.AddRoleInfoEntity(new RoleInfoEntity() { RoleId = roleId, IPString = ip, Port = port, IsSolrMaster = isMaster }); }
private static IPEndPoint GetEndpoint(RoleInstance instance, bool bMaster) { IPEndPoint endpoint; RoleInfoDataSource rids = new RoleInfoDataSource(); if (bMaster) { endpoint = rids.GetMasterEndpoint(); } else { endpoint = rids.GetSlaveEndpoint(instance.Id); } if (!CheckEndpoint(endpoint)) { return(null); } return(endpoint); }
private static IPEndPoint GetEndpoint(RoleInstance instance, bool bMaster) { IPEndPoint endpoint; RoleInfoDataSource rids = new RoleInfoDataSource(); if (bMaster) endpoint = rids.GetMasterEndpoint(); else endpoint = rids.GetSlaveEndpoint(instance.Id); if (!CheckEndpoint(endpoint)) return null; return endpoint; }