public class SnowflakeIdEngine extends Object implements IDidEngine<Long>
GEDID| Constructor and Description |
|---|
SnowflakeIdEngine() |
SnowflakeIdEngine(Long workerId,
Long dataCenterId) |
| Modifier and Type | Method and Description |
|---|---|
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 in interface IDidEngine<Long>businessName - business namestartId - the first idpublic Long next(String businessName)
IDidEnginenext in interface IDidEngine<Long>businessName - the business namepublic String engineName()
IDidEngineengineName in interface IDidEngine<Long>Copyright © 2021. All rights reserved.