public abstract class

SleepingRetryPolicy

extends Object
implements RetryPolicy
java.lang.Object
   ↳ com.netflix.astyanax.retry.SleepingRetryPolicy
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Base sleeping retry policy with optional count limit. The sleep time is delegated to the subclass.

Summary

Public Constructors
SleepingRetryPolicy(int max)
Public Methods
boolean allowRetry()
Ask the policy if a retry is allowed.
void begin()
Operation is starting
void failure(Exception e)
Operation has failed
int getAttemptCount()
Return the number of attempts since begin was called
int getMax()
int getMaxAttemptCount()
abstract long getSleepTimeMs()
void success()
Operation has completed successfully
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.netflix.astyanax.retry.RetryPolicy

Public Constructors

public SleepingRetryPolicy (int max)

Public Methods

public boolean allowRetry ()

Ask the policy if a retry is allowed. This may internally sleep

public void begin ()

Operation is starting

public void failure (Exception e)

Operation has failed

public int getAttemptCount ()

Return the number of attempts since begin was called

public int getMax ()

public int getMaxAttemptCount ()

public abstract long getSleepTimeMs ()

public void success ()

Operation has completed successfully

public String toString ()