This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.charset.StandardCharsets; | |
import java.util.Arrays; | |
import java.util.concurrent.ThreadLocalRandom; | |
/** | |
* A UUID v7 implementation following RFC 9562. | |
* <p> | |
* UUID v7 features a time-ordered value field derived from the widely implemented Unix Epoch | |
* timestamp source, providing improved database locality and performance compared to random UUIDs | |
* (v4). |