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

com.godmao.mqbroker.message.TopicSyncMessage Maven / Gradle / Ivy

package com.godmao.mqbroker.message;

import java.util.Map;

/**
 * 主题同步消息
 */
public class TopicSyncMessage {
    public static final byte                 cmd = 5;
    // 主题版本号
    private final       long                 version;
    // 是否替换所有
    private final       boolean              replace;
    // 主题和对应的订阅数量(key:主题 value:订阅这个主题的服务数量)
    private final       Map topicCount;

    public TopicSyncMessage(long version, boolean replace, Map topicCount) {
        this.version = version;
        this.replace = replace;
        this.topicCount = topicCount;
    }

    public long getVersion() {
        return version;
    }

    public boolean isReplace() {
        return replace;
    }

    public Map getTopicCount() {
        return topicCount;
    }

    public byte getCmd() {
        return cmd;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy