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

xin.alum.aim.groups.ClusterProperties Maven / Gradle / Ivy

There is a newer version: 1.9.6
Show newest version
package xin.alum.aim.groups;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import xin.alum.aim.constant.AIMConstant;

/**
 * @auther Alum(alum @ live.cn)
 * @date 2021/8/17 19:35
 */
@Data
@RefreshScope
@ConfigurationProperties(prefix = AIMConstant.CLUSTER_PROPERTIES_PREFIX)
public class ClusterProperties {
    /**
     * 集群模式,默认未开启
     */
    private ClusterMode mode = ClusterMode.None;

    /**
     * 集群模式
     */
    public enum ClusterMode {
        None("none", 0),
        Redis("redis", 1),
        RabbitMq("rabbitmq", 2);

        private String name;
        private int value;

        ClusterMode(String name, int value) {
            this.name = name;
            this.value = value;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy