Package org.springframework.util

# Class AlternativeJdkIdGenerator

java.lang.Object
org.springframework.util.AlternativeJdkIdGenerator

All Implemented Interfaces:
  `IdGenerator`

public class AlternativeJdkIdGenerator extends Object implements IdGenerator
An `IdGenerator` that uses `SecureRandom` for the initial seed and `Random` thereafter, instead of calling `UUID.randomUUID()` every time as `JdkIdGenerator` does. This provides a better balance between securely random ids and performance.

Since:
  4.0
Author:
  Rossen Stoyanchev, Rob Winch

## Constructor Summary

Constructors
Constructor
Description
`AlternativeJdkIdGenerator()`

## Method Summary

Modifier and Type
Method
Description
`UUID`
`generateId()`
Generate a new identifier.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### AlternativeJdkIdGenerator

public AlternativeJdkIdGenerator()

## Method Details

### generateId

public UUID generateId()
Description copied from interface: `IdGenerator`
Generate a new identifier.

Specified by:
  `generateId` in interface `IdGenerator`
Returns:
  the generated identifier