Class IdHelper

java.lang.Object
velox.api.layer1.utils.IdHelper

public class IdHelper extends Object
Generates ID's that are trying to be globally unique.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static long
    Generate a 64bit ID that is guaranteed to be unique within a session and is very likely to be unique between sessions too (ID counter starts at random point determined on startup and then incremented by 1 on every call)
    static String
    Generate UUID that's repackaged as BASE64 string.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IdHelper

      public IdHelper()
  • Method Details

    • generateShortUuid

      public static String generateShortUuid()
      Generate UUID that's repackaged as BASE64 string.
    • generateLongUniqueId

      public static long generateLongUniqueId()
      Generate a 64bit ID that is guaranteed to be unique within a session and is very likely to be unique between sessions too (ID counter starts at random point determined on startup and then incremented by 1 on every call)