DefaultAggregateIdempotencyCheckerProvider

Default implementation of AggregateIdempotencyCheckerProvider that caches checkers per aggregate. Uses a supplier function to create checkers on demand and caches them for future use. This ensures that each named aggregate gets its own idempotency checker instance while avoiding redundant checker creation.

Parameters

checkerSupplier

function that creates an idempotency checker for a given named aggregate

Constructors

constructor(checkerSupplier: (NamedAggregate) -> IdempotencyChecker)

Functions

Link copied to clipboard
open override fun getChecker(namedAggregate: NamedAggregate): IdempotencyChecker

Gets the cached idempotency checker for the named aggregate, creating one if it doesn't exist. Uses computeIfAbsent to ensure thread-safe lazy initialization.