RetryDuration

@Target(allowedTargets = [AnnotationTarget.FIELD])
@Constraint(validatedBy = [RetryDuration.Validator::class])
annotation class RetryDuration(val message: String = "must be a duration such as PT3M, 3m or 1h 30m, not negative", val groups: Array<KClass<*>> = [], val payload: Array<KClass<out Payload>> = [])

A retry spec's duration, as the owning service reads it: Kotlin's Duration.parse of the trimmed text, ISO-8601 (PT3M, P1DT2H) or Kotlin's own format (3m, 1h 30m, 1h30m), finite and not negative. A member left out (null) is valid: it keeps the duration the entry is retried by now.

Types

Link copied to clipboard
class Validator : ConstraintValidator<RetryDuration, String>

Reads the text as Duration.parseOrNull does.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val payload: Array<KClass<out Payload>>