All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.luoshu.open.id.IdFactory Maven / Gradle / Ivy

There is a newer version: 0.32
Show newest version
package com.luoshu.open.id;

/**
 * 基于此类,可以创建一个 id 生成器
 * @author inme
 */
public interface IdFactory {

    /**
     * 获取当前工厂的名称,注意,不同工厂之间不要重复
     * @return
     */
    String getName();

    /**
     * 创建一个 id 生成器
     * @param category 分类,每一个分类,有自己的序列
     * @param config 配置信息
     * @return 返回一个 id 生成器
     */
    IdGenerate create(String category , JdbcIdConfig config);

    /**
     * 基于默认配置,创建一个 id 生成器
     * @param category 分类,每一个分类,有自己的序列
     * @return 返回一个 id 生成器
     */
    IdGenerate create(String category);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy