Class MGL_SnowflakeIdGeneratorInstance

java.lang.Object
tech.mgl.core.utils.id.MGL_SnowflakeIdGeneratorInstance

public class MGL_SnowflakeIdGeneratorInstance extends Object
ID生成器的单例模式单例模式的
  • Constructor Details

    • MGL_SnowflakeIdGeneratorInstance

      public MGL_SnowflakeIdGeneratorInstance()
  • Method Details

    • getInstance

      public static MGL_SnowflakeIdGenerator getInstance(long workerId, long dataCenterId, boolean newStartTime)
    • setDefaultSnowIdProperties

      public static void setDefaultSnowIdProperties(long workerId, long dataCenterId, long startTime)
    • getInstance

      public static MGL_SnowflakeIdGenerator getInstance(long workerId, long dataCenterId, long startTime)
    • getInstance

      public static MGL_SnowflakeIdGenerator getInstance(long workerId, long dataCenterId)
    • getInstance

      public static MGL_SnowflakeIdGenerator getInstance()
      默认取工作机器1和数据中心1的实力
      Returns: