Class SnowflakeCreator
java.lang.Object
de.chojo.jdautil.util.SnowflakeCreator
Inspired by
https://github.com/callicoder/java-snowflake/blob/a166af56e24a01dd91d5787f0b85afd5091559c0/src/main/java/com/callicoder/snowflake/Snowflake.java
-
Method Summary
Modifier and TypeMethodDescriptionstatic SnowflakeCreatorBuilderbuilder()longnextLong()Get a new unique snowflake.Get a new unique snowflake.
-
Method Details
-
builder
-
nextString
Get a new unique snowflake.- Returns:
- a unique snowflake for the current time
-
nextLong
public long nextLong()Get a new unique snowflake.- Returns:
- a unique snowflake for the current time
-