com.xebialabs.deployit.plugin.cloud.util
Class Retrier<T>

java.lang.Object
  extended by com.xebialabs.deployit.plugin.cloud.util.Retrier<T>

public class Retrier<T>
extends java.lang.Object

Helps to retry actions which may fail for some reason


Constructor Summary
Retrier(java.util.concurrent.Callable<T> action)
           
 
Method Summary
 T retryFor(int timeout, int delay)
          Retries an action with a total timeout of timeout seconds for delay seconds delay after each attempt.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Retrier

public Retrier(java.util.concurrent.Callable<T> action)
Parameters:
action - action to be retired
Method Detail

retryFor

public T retryFor(int timeout,
                  int delay)
           throws java.util.concurrent.TimeoutException
Retries an action with a total timeout of timeout seconds for delay seconds delay after each attempt.

Throws:
java.util.concurrent.TimeoutException