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

cc.siyecao.uid.worker.AssignerMode Maven / Gradle / Ivy

There is a newer version: 2.2
Show newest version
package cc.siyecao.uid.worker;

import cc.siyecao.uid.impl.CachedUidGenerator;

/**
 * @author DengJun 2021/5/11
 */
public interface AssignerMode {
    String NONE = "none";
    String ZK = "zk";
    String REDIS = "redis";
    String DB = "db";

    /**
     * 生成器模式
     */
    enum Generator {
        /**
         * 使用基础生成器(默认)
         */
        none,
        /**
         * 使用内存生成器 {@link CachedUidGenerator}
         */
        memory,
    }

    /**
     * 节点分配器模式
     */
    enum Assigner {
        /**
         * 默认使用随机生成 workerId
         */
        none,
        /**
         * 使用REDIS生成工作节点ID
         */
        redis,
        /**
         * 使用MySQL生成工作节点ID
         */
        db
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy