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

io.deepsense.neptune.clientlibrary.config.internal.RequestRetryConfiguration Maven / Gradle / Ivy

There is a newer version: 1.6.1
Show newest version
/**
 * Copyright (c) 2016, CodiLime Inc.
 */

package io.deepsense.neptune.clientlibrary.config.internal;

import java.util.Objects;

public class RequestRetryConfiguration {

    private final boolean isRetryingTurnedOn;

    private final long maxTimeoutBetweenRequestsInMillis;

    public RequestRetryConfiguration(boolean isRetryingTurnedOn, long maxTimeoutBetweenRequestsInMillis) {
        this.isRetryingTurnedOn = isRetryingTurnedOn;
        this.maxTimeoutBetweenRequestsInMillis = maxTimeoutBetweenRequestsInMillis;
    }

    public boolean isRetryingTurnedOn() {
        return isRetryingTurnedOn;
    }

    public long getMaxTimeoutBetweenRequestsInMillis() {
        return maxTimeoutBetweenRequestsInMillis;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        RequestRetryConfiguration that = (RequestRetryConfiguration) o;
        return isRetryingTurnedOn == that.isRetryingTurnedOn
                && maxTimeoutBetweenRequestsInMillis == that.maxTimeoutBetweenRequestsInMillis;
    }

    @Override
    public int hashCode() {
        return Objects.hash(isRetryingTurnedOn, maxTimeoutBetweenRequestsInMillis);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy