All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netflix.astyanax.retry.IndefiniteRetry Maven / Gradle / Ivy

There is a newer version: 3.10.2
Show newest version
package com.netflix.astyanax.retry;

public class IndefiniteRetry implements RetryPolicy {

    private int counter = 1;
    
    @Override
    public void begin() {
        counter = 1;
    }

    @Override
    public void success() {
    }

    @Override
    public void failure(Exception e) {
        counter++;
    }

    @Override
    public boolean allowRetry() {
        return true;
    }

    @Override
    public int getAttemptCount() {
        return counter;
    }

    @Override
    public RetryPolicy duplicate() {
        return new IndefiniteRetry();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy