Class LazyRandom

java.lang.Object
com.fasterxml.uuid.impl.LazyRandom

public final class LazyRandom extends Object
Trivial helper class that uses class loading as synchronization mechanism for lazy instantiation of the shared secure random instance.

Since 5.0 has been lazily created to avoid issues with native-generation tools like Graal.

  • Field Details

    • lock

      private static final Object lock
    • shared

      private static volatile SecureRandom shared
  • Constructor Details

    • LazyRandom

      public LazyRandom()
  • Method Details

    • sharedSecureRandom

      public static SecureRandom sharedSecureRandom()