public class SnowflakeIdEngine extends Object implements IDidEngine<Long>
GEDID| 构造器和说明 |
|---|
SnowflakeIdEngine() |
SnowflakeIdEngine(Long workerId,
Long dataCenterId) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
engineName()
current engine's name
|
void |
follow(String businessName,
Long startId)
Follow The business with name.
|
Long |
next(String businessName)
the next id
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEmbellishedName, getFixedStartId, unsupportedOperationpublic void follow(String businessName, Long startId)
IDidEnginefollow 在接口中 IDidEngine<Long>businessName - business namestartId - the first idpublic Long next(String businessName)
IDidEnginenext 在接口中 IDidEngine<Long>businessName - the business namepublic String engineName()
IDidEngineengineName 在接口中 IDidEngine<Long>Copyright © 2022. All rights reserved.