public class DefaultIdentifierFactory extends IdentifierFactory
java.util.UUID
based identifiers.
Although the performance of this strategy is not the best out there, it has native supported on all JVMs.
This implementations selects a random identifier out of about 3 x 1038 possible values, making the chance
to get a duplicate incredibly small.Constructor and Description |
---|
DefaultIdentifierFactory() |
Modifier and Type | Method and Description |
---|---|
String |
generateIdentifier()
Generates a unique identifier for use by Entities (generally the Aggregate Root) and Events.
|
getInstance
public String generateIdentifier()
generateIdentifier
in class IdentifierFactory
Copyright © 2010–2018. All rights reserved.