public class GenIdFactory extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static long |
get()
使用默认的命名key来获取id.
|
static long |
get(String bizType)
get id from factory.default GenType class is: SerialUniqueId.
|
static long |
get(String bizType,
String genType) |
static long[] |
getRangeId(int sizeOfIds)
获取一个范围的id.
|
static long[] |
getRangeId(String bizType,
int sizeOfIds) |
static long[] |
getRangeId(String bizType,
String genType,
int sizeOfIds) |
public static long get()
public static long[] getRangeId(int sizeOfIds)
sizeOfIds - size of Idspublic static long get(String bizType)
bizType - bizType作为隔离的命名空间.bizType as namespace.public static long get(String bizType, String genType)
bizType - bizType作为隔离的命名空间.bizType as namespace.genType - it is one of SerialUniqueId,OneTimeSnowflakeId or PearFlowerId.public static long[] getRangeId(String bizType, int sizeOfIds)
Copyright © 2021. All rights reserved.