very minor revision of UuidGenerator jdoc
This commit is contained in:
parent
4a6c26ca4b
commit
9e76f54d06
|
@ -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
|
||||
* <a href=https://datatracker.ietf.org/doc/html/rfc4122>IETF RFC 4122 UUID</a>.
|
||||
* <p>
|
||||
* 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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue