Top Description Fields Constructors Methods
org.springframework.util

public Class SimpleIdGenerator

extends Object
implements IdGenerator
Class Inheritance
All Implemented Interfaces
org.springframework.util.IdGenerator
Imports
java.util.UUID, java.util.concurrent.atomic.AtomicLong

A simple IdGenerator that starts at 1, increments up to Long#MAX_VALUE, and then rolls over.
Author
Rossen Stoyanchev
Since
4.1.5

Field Summary

Modifier and TypeField and Description
private final AtomicLong

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public UUID
generateId()

Implements org.springframework.util.IdGenerator.generateId.

Generate a new identifier.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

leastSigBitsback to summary
private final AtomicLong leastSigBits

Constructor Detail

SimpleIdGeneratorback to summary
public SimpleIdGenerator()

Method Detail

generateIdback to summary
public UUID generateId()

Implements org.springframework.util.IdGenerator.generateId.

Doc from org.springframework.util.IdGenerator.generateId.

Generate a new identifier.

Returns:UUID

the generated identifier

Annotations
@Override