类 UlidCreator

java.lang.Object
cn.vonce.sql.uitls.UlidCreator

public final class UlidCreator extends Object
A class that generates ULIDs.

Both types of ULID can be easily created by this generator, i.e. monotonic and non-monotonic.

  • 方法详细资料

    • getUlid

      public static Ulid getUlid()
      Returns a ULID.
      返回:
      a ULID
    • getUlid

      public static Ulid getUlid(long time)
      Returns a ULID with a given time.
      参数:
      time - a number of milliseconds since 1970-01-01 (Unix epoch).
      返回:
      a ULID
    • getMonotonicUlid

      public static Ulid getMonotonicUlid()
      Returns a Monotonic ULID.
      返回:
      a ULID
    • getMonotonicUlid

      public static Ulid getMonotonicUlid(long time)
      Returns a Monotonic ULID with a given time.
      参数:
      time - a number of milliseconds since 1970-01-01 (Unix epoch).
      返回:
      a ULID