org.skyscreamer.nevado.jms.util
Class BackoffSleeper

java.lang.Object
  extended by org.skyscreamer.nevado.jms.util.BackoffSleeper

public class BackoffSleeper
extends Object

This "sleeper" sleeps and backs off over time until it is reset. It is used when looking for messages, so active destinations can be checked more frequently for better response. Less active destinations will be checked less frequently as the sleeper backs off, to save AWS costs and unnecessary network calls.

Author:
Carter Page

Constructor Summary
BackoffSleeper(long minWait, long maxWait, double backoffMultiplier)
           
 
Method Summary
 void reset()
           
 void sleep()
           
 void stopSleeping()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackoffSleeper

public BackoffSleeper(long minWait,
                      long maxWait,
                      double backoffMultiplier)
Method Detail

reset

public void reset()

sleep

public void sleep()
           throws InterruptedException
Throws:
InterruptedException

stopSleeping

public void stopSleeping()


Copyright © 2013. All Rights Reserved.