CosIdAggregateIdGeneratorFactory

@Order(value = 2147483647)
class CosIdAggregateIdGeneratorFactory(idProvider: IdGeneratorProvider = DefaultIdGeneratorProvider.INSTANCE) : AggregateIdGeneratorFactory

Factory for creating IdGenerator instances for NamedAggregate using the CosId library.

This factory attempts to retrieve an existing IdGenerator from the IdGeneratorProvider based on the aggregate's metadata ID or name. If no generator is found, it creates a new ClockSyncCosIdGenerator with a Radix62CosIdGenerator using the global machine ID.

The factory is ordered with ORDER_LAST to serve as a fallback when other factories cannot provide a generator.

See also

Constructors

Link copied to clipboard
constructor(idProvider: IdGeneratorProvider = DefaultIdGeneratorProvider.INSTANCE)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun create(namedAggregate: NamedAggregate): IdGenerator

Creates an IdGenerator for the specified NamedAggregate.