You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
714 B
23 lines
714 B
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;
|
|
}
|
|
}
|
|
}
|
|
|