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

com.malinskiy.marathon.config.strategy.RetryStrategyConfiguration.kt Maven / Gradle / Ivy

package com.malinskiy.marathon.config.strategy

import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.annotation.JsonSubTypes
import com.fasterxml.jackson.annotation.JsonTypeInfo

@JsonTypeInfo(
    use = JsonTypeInfo.Id.NAME,
    include = JsonTypeInfo.As.PROPERTY,
    property = "type"
)
@JsonSubTypes(
    JsonSubTypes.Type(value = RetryStrategyConfiguration.FixedQuotaRetryStrategyConfiguration::class, name = "fixed-quota"),
    JsonSubTypes.Type(value = RetryStrategyConfiguration.NoRetryStrategyConfiguration::class, name = "no-retry"),
)
sealed class RetryStrategyConfiguration {
    data class FixedQuotaRetryStrategyConfiguration(
        @JsonProperty("totalAllowedRetryQuota") val totalAllowedRetryQuota: Int = 200,
        @JsonProperty("retryPerTestQuota") val retryPerTestQuota: Int = 3
    ) : RetryStrategyConfiguration()

    object NoRetryStrategyConfiguration : RetryStrategyConfiguration()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy