|
|
@ -53,6 +53,7 @@ public class MicroPhotoContext {
|
|
|
|
public int heartbeat; // Unit minute
|
|
|
|
public int heartbeat; // Unit minute
|
|
|
|
public int[] absHeartbeats; // second
|
|
|
|
public int[] absHeartbeats; // second
|
|
|
|
public int separateNetwork;
|
|
|
|
public int separateNetwork;
|
|
|
|
|
|
|
|
public int mpappMonitorTimeout = 30 * 60000; // 30 minutes
|
|
|
|
|
|
|
|
|
|
|
|
public String getUrl() {
|
|
|
|
public String getUrl() {
|
|
|
|
if (TextUtils.isEmpty(server)) {
|
|
|
|
if (TextUtils.isEmpty(server)) {
|
|
|
@ -241,6 +242,12 @@ public class MicroPhotoContext {
|
|
|
|
masterConfig.quickHbMode = jsonObject.optInt("quickHbMode", 0);
|
|
|
|
masterConfig.quickHbMode = jsonObject.optInt("quickHbMode", 0);
|
|
|
|
masterConfig.usingAbsHbTime = jsonObject.optInt("usingAbsHbTime", 0);
|
|
|
|
masterConfig.usingAbsHbTime = jsonObject.optInt("usingAbsHbTime", 0);
|
|
|
|
masterConfig.separateNetwork = jsonObject.optInt("separateNetwork", 0);
|
|
|
|
masterConfig.separateNetwork = jsonObject.optInt("separateNetwork", 0);
|
|
|
|
|
|
|
|
// masterConfig.mpappMonitorTimeout = jsonObject.optInt("mpappMonitorTimeout", 30 * 60000);
|
|
|
|
|
|
|
|
int mpappMonitorTimeout = jsonObject.optInt("mpappMonitorTimeout", 30 * 60000);
|
|
|
|
|
|
|
|
if (mpappMonitorTimeout >= 4 * 60000 && mpappMonitorTimeout <= 35 * 60000) {
|
|
|
|
|
|
|
|
masterConfig.mpappMonitorTimeout = mpappMonitorTimeout;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// long defaultHearbeat = masterConfig.separateNetwork == 0 ? DEFAULT_HEARTBEAT_FOR_SHARED_NW : DEFAULT_HEARTBEAT_FOR_SEPARATE_NW;
|
|
|
|
// long defaultHearbeat = masterConfig.separateNetwork == 0 ? DEFAULT_HEARTBEAT_FOR_SHARED_NW : DEFAULT_HEARTBEAT_FOR_SEPARATE_NW;
|
|
|
|
masterConfig.heartbeat = jsonObject.optInt("heartbeat", DEFAULT_HEARTBEAT_FOR_SHARED_NW);
|
|
|
|
masterConfig.heartbeat = jsonObject.optInt("heartbeat", DEFAULT_HEARTBEAT_FOR_SHARED_NW);
|
|
|
|
if (jsonObject.has("absHeartbeats")) {
|
|
|
|
if (jsonObject.has("absHeartbeats")) {
|
|
|
|