@VisibleForTesting /*package*/ void install(Channel channel, @CheckForNull SlaveComputer c) { if (pingTimeoutSeconds < 1 || pingIntervalSeconds < 1) { LOGGER.warning("Agent ping is disabled"); return; } // set up ping from both directions, so that in case of a router dropping a connection, // both sides can notice it and take compensation actions. try { channel.call(new SetUpRemotePing(pingTimeoutSeconds, pingIntervalSeconds)); LOGGER.fine("Set up a remote ping for " + channel.getName()); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Failed to set up a ping for " + channel.getName(), e); } setUpPingForChannel(channel, c, pingTimeoutSeconds, pingIntervalSeconds, true); }
@VisibleForTesting /*package*/ void install(Channel channel, @CheckForNull SlaveComputer c) { if (pingTimeoutSeconds < 1 || pingIntervalSeconds < 1) { LOGGER.warning("Agent ping is disabled"); return; } // set up ping from both directions, so that in case of a router dropping a connection, // both sides can notice it and take compensation actions. try { channel.call(new SetUpRemotePing(pingTimeoutSeconds, pingIntervalSeconds)); LOGGER.fine("Set up a remote ping for " + channel.getName()); } catch (Exception e) { LOGGER.log(Level.SEVERE, "Failed to set up a ping for " + channel.getName(), e); } setUpPingForChannel(channel, c, pingTimeoutSeconds, pingIntervalSeconds, true); }
protected Object readResolve() { if (pingInterval != 0) { return new SetUpRemotePing(PING_TIMEOUT_SECONDS_DEFAULT, pingInterval * 60); } return this; } }
protected Object readResolve() { if (pingInterval != 0) { return new SetUpRemotePing(PING_TIMEOUT_SECONDS_DEFAULT, pingInterval * 60); } return this; } }