public abstract class IdentifierFactory extends Object
ServiceLoader
mechanism to find implementations. If none are found, it defaults to an
implementation that provides randomly chosen java.util.UUID
s.
To provide your own implementation, create a file called org.axonframework.common.IdentifierFactory
in
the META-INF/services
package. The file must contain the fully qualified class name of the
implementation to use. This implementation must have a public no-arg constructor and extend IdentifierFactory.
This class is thread safe to use.ServiceLoader
Constructor and Description |
---|
IdentifierFactory() |
Modifier and Type | Method and Description |
---|---|
abstract String |
generateIdentifier()
Generates a unique identifier for use by Entities (generally the Aggregate Root) and Events.
|
static IdentifierFactory |
getInstance()
Returns an instance of the IdentifierFactory discovered on the classpath.
|
public static IdentifierFactory getInstance()
ServiceLoader
mechanism to find implementations. If none are found, it defaults to an implementation that
provides randomly chosen java.util.UUID
s.ServiceLoader
public abstract String generateIdentifier()
Copyright © 2010–2023. All rights reserved.