Class UUIDClock

java.lang.Object
com.fasterxml.uuid.UUIDClock

public class UUIDClock extends Object
UUIDClock is used by UUIDTimer to get the current time. The default implementation returns the time from the system clock, but this class can be overriden to return any number. This is useful when UUIDs with past or future timestamps should be generated, or when UUIDs must be generated in a reproducible manner.
Since:
3.3
  • Constructor Details

    • UUIDClock

      public UUIDClock()
  • Method Details

    • systemTimeClock

      public static UUIDClock systemTimeClock()
      Since:
      4.3
    • currentTimeMillis

      public long currentTimeMillis()
      Returns the current time in milliseconds.