static String masterAppID = "snova-master";
static String[] injectRange = null;
public static boolean init()
{
IniProperties cfg = SnovaConfiguration.getInstance().getIniProperties();
if (cfg.getIntProperty("GAE", "Enable", 1) == 0)
{
return false;
}
for (int i = 0;; i++)
{
String v = cfg.getProperty("GAE", "WorkerNode[" + i + "]");
if (null == v || v.length() == 0)
{
break;
}
GAEServerAuth auth = new GAEServerAuth();
if (!auth.parse(v.trim()))
{
logger.error("Failed to parse appid:" + v);
break;
}
appids.add(auth);
}
if (appids.isEmpty() && (C4.enable))
{
return false;
}
masterAppID = cfg.getProperty("GAE", "MasterAppID", "snova-master");
String tmp = cfg.getProperty("GAE", "InjectRange");
if (!StringHelper.isEmptyString(tmp))
{
injectRange = tmp.split("[,|;|\\|]");
}
return true;