Class TaskRetryLooper


  • public class TaskRetryLooper
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      TaskRetryLooper​(long tick, int maxRetries)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> T loopUntilNoException​(java.util.concurrent.Callable<T> task)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TaskRetryLooper

        public TaskRetryLooper​(long tick,
                               int maxRetries)
        Constructor.
        Parameters:
        tick - sleep between steps in miliseconds
        maxRetries - retries limit
    • Method Detail

      • loopUntilNoException

        public <T> T loopUntilNoException​(java.util.concurrent.Callable<T> task)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception