1
0
mirror of synced 2025-12-17 02:28:12 +08:00

修改IdHelper命名

This commit is contained in:
zhouzj
2021-03-15 13:14:06 +08:00
parent 3f368a1e88
commit 7ade620f9c
6 changed files with 15 additions and 15 deletions

View File

@@ -9,9 +9,9 @@ import com.yitter.contract.IdGeneratorOptions;
import com.yitter.contract.IIdGenerator;
/**
* 这是一个调用的例子默认情况下单机集成者可以直接使用 NewId()
* 这是一个调用的例子默认情况下单机集成者可以直接使用 nextId()
*/
public class IdHelper {
public class YitIdHelper {
private static IIdGenerator idGenInstance = null;

View File

@@ -3,7 +3,7 @@ package com.yitter.test;
import com.yitter.contract.IdGeneratorOptions;
import com.yitter.contract.IIdGenerator;
import com.yitter.idgen.DefaultIdGenerator;
import com.yitter.idgen.IdHelper;
import com.yitter.idgen.YitIdHelper;
public class StartUp {
@@ -38,8 +38,8 @@ public class StartUp {
GenTest genTest = new GenTest(IdGen, genIdCount, options.WorkerId);
// 首先测试一下 IdHelper 方法获取单个Id
IdHelper.setIdGenerator(options);
long newId = IdHelper.nextId();
YitIdHelper.setIdGenerator(options);
long newId = YitIdHelper.nextId();
System.out.println("=====================================");
System.out.println("这是用方法 " + method + " 生成的 Id" + newId);