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

org.opensearch.ml.common.connector.RetryBackoffPolicy Maven / Gradle / Ivy

There is a newer version: 2.17.1.0
Show newest version
/*
 * Copyright OpenSearch Contributors
 * SPDX-License-Identifier: Apache-2.0
 */

package org.opensearch.ml.common.connector;

import java.util.Locale;

public enum RetryBackoffPolicy {
    CONSTANT,
    EXPONENTIAL_EQUAL_JITTER,
    EXPONENTIAL_FULL_JITTER;

    public static RetryBackoffPolicy from(String value) {
        try {
            return RetryBackoffPolicy.valueOf(value.toUpperCase(Locale.ROOT));
        } catch (Exception e) {
            throw new IllegalArgumentException("Unsupported retry backoff policy");
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy