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

com.malinskiy.marathon.config.strategy.ShardingStrategyConfiguration.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 = ShardingStrategyConfiguration.CountShardingStrategyConfiguration::class, name = "count"),
    JsonSubTypes.Type(value = ShardingStrategyConfiguration.ParallelShardingStrategyConfiguration::class, name = "parallel"),
)
sealed class ShardingStrategyConfiguration {
    data class CountShardingStrategyConfiguration(@JsonProperty("count") val count: Int) : ShardingStrategyConfiguration()
    object ParallelShardingStrategyConfiguration : ShardingStrategyConfiguration()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy