Package tech.mgl.core.utils.id
Class MGL_SnowflakeIdGeneratorInstance
java.lang.Object
tech.mgl.core.utils.id.MGL_SnowflakeIdGeneratorInstance
ID生成器的单例模式单例模式的
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MGL_SnowflakeIdGenerator默认取工作机器1和数据中心1的实力static MGL_SnowflakeIdGeneratorgetInstance(long workerId, long dataCenterId) static MGL_SnowflakeIdGeneratorgetInstance(long workerId, long dataCenterId, boolean newStartTime) static MGL_SnowflakeIdGeneratorgetInstance(long workerId, long dataCenterId, long startTime) static voidsetDefaultSnowIdProperties(long workerId, long dataCenterId, long startTime)
-
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
-
getInstance
默认取工作机器1和数据中心1的实力- Returns:
-