using Sog; namespace Account { public static class DBServerSelect { private static uint DBServerID = 0; public static void Init(ServerApp app) { // 主备模式下cluster有独立的2套服务器, 每套服务器根据instId连接自己的DBServer int instId = (int) ServerIDUtils.GetInstanceID(app.ServerID); DBServerID = ServerIDUtils.GetLevel0ServerIDByType((int) ServerType.Db, instId); TraceLog.Debug("DBServerSelect.Init DBServerID {0}", ServerIDUtils.IDToString(DBServerID)); } public static uint GetDBServerID(int accountType,string accountID) { return DBServerID; } } }