@Test public void testGetHeartbeatInterval() { long interval = 20000; assertNull(TransportConfig.getHeartbeatIntervalMs()); SentinelConfig.setConfig(TransportConfig.HEARTBEAT_INTERVAL_MS, String.valueOf(interval)); assertEquals(new Long(interval), TransportConfig.getHeartbeatIntervalMs()); SentinelConfig.setConfig(TransportConfig.HEARTBEAT_INTERVAL_MS, "Sentinel"); assertNull(TransportConfig.getHeartbeatIntervalMs()); }
public static Long getHeartbeatIntervalMs() { String interval = SentinelConfig.getConfig(HEARTBEAT_INTERVAL_MS); try { return interval == null ? null : Long.parseLong(interval); } catch (Exception ex) { RecordLog.warn("[TransportConfig] Failed to parse heartbeat interval: " + interval); return null; } }
TransportConfig { public static Long getHeartbeatIntervalMs() { String interval = SentinelConfig.getConfig(HEARTBEAT_INTERVAL_MS); try { return interval == null ? null : Long.parseLong(interval); } catch (Exception ex) { RecordLog.warn("[TransportConfig] Failed to parse heartbeat interval: " + interval); return null; } } }
TransportConfig { public static Long getHeartbeatIntervalMs() { String interval = SentinelConfig.getConfig(HEARTBEAT_INTERVAL_MS); try { return interval == null ? null : Long.parseLong(interval); } catch (Exception ex) { RecordLog.warn("[TransportConfig] Failed to parse heartbeat interval: " + interval); return null; } }  }
TransportConfig { public static Long getHeartbeatIntervalMs() { String interval = SentinelConfig.getConfig(HEARTBEAT_INTERVAL_MS); try { return interval == null ? null : Long.parseLong(interval); } catch (Exception ex) { RecordLog.warn("[TransportConfig] Failed to parse heartbeat interval: " + interval); return null; } }  static Long getHeartbeatIntervalMs(); static String getConsoleServer(); static int getRuntimePort(); static String getPort(); static void setRuntimePort(int port); static String getHeartbeatClientIp(); }
TransportConfig { public static Long getHeartbeatIntervalMs() { String interval = SentinelConfig.getConfig(HEARTBEAT_INTERVAL_MS); try { return interval == null ? null : Long.parseLong(interval); } catch (Exception ex) { RecordLog.warn("[TransportConfig] Failed to parse heartbeat interval: " + interval); return null; } }  static Long getHeartbeatIntervalMs(); static String getConsoleServer(); static int getRuntimePort(); static String getPort(); static void setRuntimePort(int port); static String getHeartbeatClientIp(); static final String CONSOLE_SERVER; static final String SERVER_PORT; static final String HEARTBEAT_INTERVAL_MS; static final String HEARTBEAT_CLIENT_IP; }