Package com.fasterxml.uuid
Class UUIDClock
java.lang.Object
com.fasterxml.uuid.UUIDClock
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the current time in milliseconds.static UUIDClock
-
Constructor Details
-
UUIDClock
public UUIDClock()
-
-
Method Details
-
systemTimeClock
- Since:
- 4.3
-
currentTimeMillis
public long currentTimeMillis()Returns the current time in milliseconds.
-