@Documented
@Retention(value=RUNTIME)
public @interface Snowflake
Snowflakes is a time-based ID generation, originally created by Twitter.
It's used by Twitter, Discord and other projects as a better reliable way of generating IDs instead of using Serial IDs.
A Snowflake is composed by a Custom-Epoch Timestamp, a Datacenter ID, a Worker ID and a Sequencial ID, being the Snowflakes.TWITTER_FACTORY the reference settings.
Configs using reflections.| Modifier and Type | Required Element and Description |
|---|---|
long |
epoch
Returns the Epoch of the Snowflake
|
| Modifier and Type | Optional Element and Description |
|---|---|
long |
datacenterIdBits
How much of the Snowflake is occupied by the Datacenter ID, in bits.
|
long |
sequenceBits
How much of the Snowflake is occupied by the Sequence ID, in bits.
|
long |
workerIdBits
How much of the Snowflake is occupied by the Worker ID, in bits.
|
public abstract long epoch
public abstract long datacenterIdBits