/** * This method determines whether the inform request is to be retried. This is used if the peer * did not respond to a previous request. If the request exceeds the maxTries limit, a timeout is * signaled. */ void action() { if (inProgress() == false) return; while (true) { try { if (numTries == 0) { invokeOnReady(); } else if (numTries < getMaxTries()) { invokeOnRetry(); } else { invokeOnTimeout(); } return; } catch (OutOfMemoryError omerr) { // Consider it as a try ! // numTries++; if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) { SNMP_ADAPTOR_LOGGER.logp( Level.FINEST, SnmpInformRequest.class.getName(), "action", "Inform request hit out of memory situation..."); } Thread.currentThread().yield(); } } }
private final void invokeOnRetry() { invokeOnReady(); }