com.netflix.astyanax.retry
Class IndefiniteRetry

java.lang.Object
  extended by com.netflix.astyanax.retry.IndefiniteRetry
All Implemented Interfaces:
RetryPolicy

public class IndefiniteRetry
extends java.lang.Object
implements RetryPolicy


Constructor Summary
IndefiniteRetry()
           
 
Method Summary
 boolean allowRetry()
          Ask the policy if a retry is allowed.
 void begin()
          Operation is starting
 RetryPolicy duplicate()
          Duplicate this policy into a fresh instance
 void failure(java.lang.Exception e)
          Operation has failed
 int getAttemptCount()
          Return the number of attempts since begin was called
 void success()
          Operation has completed successfully
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndefiniteRetry

public IndefiniteRetry()
Method Detail

begin

public void begin()
Description copied from interface: RetryPolicy
Operation is starting

Specified by:
begin in interface RetryPolicy

success

public void success()
Description copied from interface: RetryPolicy
Operation has completed successfully

Specified by:
success in interface RetryPolicy

failure

public void failure(java.lang.Exception e)
Description copied from interface: RetryPolicy
Operation has failed

Specified by:
failure in interface RetryPolicy

allowRetry

public boolean allowRetry()
Description copied from interface: RetryPolicy
Ask the policy if a retry is allowed. This may internally sleep

Specified by:
allowRetry in interface RetryPolicy
Returns:

getAttemptCount

public int getAttemptCount()
Description copied from interface: RetryPolicy
Return the number of attempts since begin was called

Specified by:
getAttemptCount in interface RetryPolicy
Returns:

duplicate

public RetryPolicy duplicate()
Description copied from interface: RetryPolicy
Duplicate this policy into a fresh instance

Specified by:
duplicate in interface RetryPolicy
Returns: