- All Implemented Interfaces:
- Tickets
public class TimebasedTickets
extends Object
implements Tickets
This generates unique IDs (unique within a particular stallion application) based on the current time.
This is used in file based systems.
Generates a unique ticket based on a counter, the current time rounded to nearest 10 seconds, and the node number.
This will create duplicates if you need to generate more than 10,000 tickets in a second.
This will also exceed the MAX_SAFE_INTEGER value for javascript around the year 2248.