public class RetryNTimesLoop extends Object
final RetryNTimesLoop retryLoop = new RetryNTimesLoop(3); while (retryLoop.shouldContinue()) { try { node = client.get(resourceUri, selectors); break; } catch (WSManException e) { retryLoop.takeException(e); } }
Constructor and Description |
---|
RetryNTimesLoop(int numberOfRetries) |
Modifier and Type | Method and Description |
---|---|
boolean |
shouldContinue() |
void |
takeException(org.opennms.core.wsman.exceptions.WSManException e) |
Copyright © 2020. All rights reserved.