Class SnowflakeCreator

java.lang.Object
de.chojo.jdautil.util.SnowflakeCreator

public class SnowflakeCreator extends Object
Inspired by https://github.com/callicoder/java-snowflake/blob/a166af56e24a01dd91d5787f0b85afd5091559c0/src/main/java/com/callicoder/snowflake/Snowflake.java
  • Method Details

    • builder

      public static SnowflakeCreatorBuilder builder()
    • nextString

      public String 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