From 9e76f54d06b436278fc65a84ed033a3e4f03a161 Mon Sep 17 00:00:00 2001 From: Gavin King Date: Wed, 6 Dec 2023 16:06:17 +0100 Subject: [PATCH] very minor revision of UuidGenerator jdoc --- .../hibernate/annotations/UuidGenerator.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/annotations/UuidGenerator.java b/hibernate-core/src/main/java/org/hibernate/annotations/UuidGenerator.java index b1382dd9af..f3edf6a4b1 100644 --- a/hibernate-core/src/main/java/org/hibernate/annotations/UuidGenerator.java +++ b/hibernate-core/src/main/java/org/hibernate/annotations/UuidGenerator.java @@ -16,7 +16,8 @@ import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** - * Specifies that an entity identifier is generated as an RFC 4122 UUID. + * Specifies that an entity identifier is generated as an + * IETF RFC 4122 UUID. *

* The type of the identifier attribute may be {@link UUID} or {@link String}. * @@ -30,21 +31,25 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; @Target({ FIELD, METHOD }) public @interface UuidGenerator { + /** + * Represents a kind of UUID, that is, what RFC 4122 calls a "version". + */ enum Style { /** * Defaults to {@link #RANDOM}. */ AUTO, /** - * Uses {@link UUID#randomUUID()} to generate values. + * Use {@link UUID#randomUUID()} to generate UUIDs, producing a value + * compatible with RFC 4122 version 4. */ RANDOM, /** - * Applies a time-based generation strategy consistent with IETF RFC 4122. - * Uses IP address rather than MAC address. + * Use a time-based generation strategy consistent with RFC 4122 + * version 1, but with IP address instead of MAC address. * - * @implNote Can be a bottleneck due to the need to synchronize in order - * to increment an internal count as part of the algorithm. + * @implNote Can be a bottleneck, since synchronization is used when + * incrementing an internal counter as part of the algorithm. */ TIME }