Ejemplo n.º 1
0
 public bool allowRetry(int retryCount, long elapsedTimeMs, IRetrySleeper sleeper)
 {
     try
     {
         sleeper.sleepFor(retryIntervalMs);
     }
     catch (Exception e)
     {
         Thread.CurrentThread.Abort();
         log.Warn(e, "Error occurred while sleeping");
         return(false);
     }
     return(true);
 }
Ejemplo n.º 2
0
 public bool allowRetry(int retryCount, long elapsedTimeMs, IRetrySleeper sleeper)
 {
     try
     {
         sleeper.sleepFor(retryIntervalMs);
     }
     catch (Exception e)
     {
         Thread.CurrentThread.Abort();
         log.Warn(e, "Error occurred while sleeping");
         return false;
     }
     return true;
 }
Ejemplo n.º 3
0
 public virtual bool allowRetry(int retryCount, long elapsedTimeMs, IRetrySleeper sleeper)
 {
     if (retryCount < n)
     {
         try
         {
             sleeper.sleepFor(getSleepTimeMs(retryCount, elapsedTimeMs));
         }
         catch (Exception)
         {
             Thread.CurrentThread.Abort();
             return false;
         }
         return true;
     }
     return false;
 }
Ejemplo n.º 4
0
 public virtual bool allowRetry(int retryCount, long elapsedTimeMs, IRetrySleeper sleeper)
 {
     if (retryCount < n)
     {
         try
         {
             sleeper.sleepFor(getSleepTimeMs(retryCount, elapsedTimeMs));
         }
         catch (Exception)
         {
             Thread.CurrentThread.Abort();
             return(false);
         }
         return(true);
     }
     return(false);
 }