Time Limiter Registry
Registry for managing multiple named time limiters.
Example usage:
val registry = TimeLimiterRegistry.create()
val fastLimiter = registry.getOrCreate("fast-operations") {
timeout = 1.seconds
}
val slowLimiter = registry.getOrCreate("slow-operations") {
timeout = 30.seconds
}Content copied to clipboard
Types
Link copied to clipboard
object Companion
Factory for TimeLimiterRegistry.
Functions
Link copied to clipboard
Gets an existing time limiter by name.
Link copied to clipboard
Gets statistics for all time limiters.
Link copied to clipboard
suspend fun getOrCreate(name: String, configure: TimeLimiterConfigBuilder.() -> Unit? = null): TimeLimiter
Gets an existing time limiter or creates a new one.
Link copied to clipboard
Removes a time limiter from the registry.
Link copied to clipboard
Resets statistics for all time limiters in the registry.