ShardingProperties

@ConfigurationProperties(prefix = "wow.r2dbc.datasource.sharding")
class ShardingProperties(val databases: Map<String, ShardingProperties.Database> = mapOf(), val eventStream: Map<String, ShardingProperties.ShardingRule> = mapOf(), val snapshot: Map<String, ShardingProperties.ShardingRule> = mapOf(), val algorithms: Map<String, ShardingProperties.ShardingAlgorithm> = mapOf())

Constructors

Link copied to clipboard
constructor(databases: Map<String, ShardingProperties.Database> = mapOf(), eventStream: Map<String, ShardingProperties.ShardingRule> = mapOf(), snapshot: Map<String, ShardingProperties.ShardingRule> = mapOf(), algorithms: Map<String, ShardingProperties.ShardingAlgorithm> = mapOf())

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class Database(val url: String)
Link copied to clipboard
data class ModAlgorithm(val logicNamePrefix: String, val divisor: Int)
Link copied to clipboard
data class ShardingAlgorithm(val type: String = MOD_ALG, val mod: ShardingProperties.ModAlgorithm?, val single: ShardingProperties.SingleAlgorithm?)
Link copied to clipboard
data class ShardingRule(val databaseAlgorithm: String, val tableAlgorithm: String)
Link copied to clipboard
data class SingleAlgorithm(val node: String)

Properties