create

open override fun create(namedAggregate: NamedAggregate): IdGenerator

Creates an IdGenerator for the specified NamedAggregate.

This method first attempts to retrieve an existing IdGenerator from the idProvider using the aggregate's ID from metadata or the aggregate name as the key. If found, it returns the existing generator. If not found, it creates a new ClockSyncCosIdGenerator wrapping a Radix62CosIdGenerator initialized with the global machine ID.

Return

the IdGenerator for the aggregate, either retrieved from the provider or newly created

Parameters

namedAggregate

the NamedAggregate for which to create the ID generator