當前位置: 首頁>>代碼示例>>Java>>正文


Java BrokerStatsManager類代碼示例

本文整理匯總了Java中com.alibaba.rocketmq.store.stats.BrokerStatsManager的典型用法代碼示例。如果您正苦於以下問題:Java BrokerStatsManager類的具體用法?Java BrokerStatsManager怎麽用?Java BrokerStatsManager使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BrokerStatsManager類屬於com.alibaba.rocketmq.store.stats包,在下文中一共展示了BrokerStatsManager類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: DefaultMessageStore

import com.alibaba.rocketmq.store.stats.BrokerStatsManager; //導入依賴的package包/類
public DefaultMessageStore(final MessageStoreConfig messageStoreConfig, final BrokerStatsManager brokerStatsManager,
                           final MessageArrivingListener messageArrivingListener, final BrokerConfig brokerConfig) throws IOException {
    this.messageArrivingListener = messageArrivingListener;
    this.brokerConfig = brokerConfig;
    this.messageStoreConfig = messageStoreConfig;
    this.brokerStatsManager = brokerStatsManager;
    this.allocateMapedFileService = new AllocateMapedFileService(this);
    this.commitLog = new CommitLog(this);
    this.consumeQueueTable = new ConcurrentHashMap<String/* topic */, ConcurrentHashMap<Integer/* queueId */, ConsumeQueue>>(32);

    this.flushConsumeQueueService = new FlushConsumeQueueService();
    this.cleanCommitLogService = new CleanCommitLogService();
    this.cleanConsumeQueueService = new CleanConsumeQueueService();
    this.storeStatsService = new StoreStatsService();
    this.indexService = new IndexService(this);
    this.haService = new HAService(this);

    this.reputMessageService = new ReputMessageService();
    this.scheduleMessageService = new ScheduleMessageService(this);

    this.allocateMapedFileService.start();
    this.indexService.start();
}
 
開發者ID:medusar,項目名稱:rocketmq-commet,代碼行數:24,代碼來源:DefaultMessageStore.java

示例2: BrokerController

import com.alibaba.rocketmq.store.stats.BrokerStatsManager; //導入依賴的package包/類
public BrokerController(//
        final BrokerConfig brokerConfig, //
        final NettyServerConfig nettyServerConfig, //
        final NettyClientConfig nettyClientConfig, //
        final MessageStoreConfig messageStoreConfig //
) {
    this.brokerConfig = brokerConfig;
    this.nettyServerConfig = nettyServerConfig;
    this.nettyClientConfig = nettyClientConfig;
    this.messageStoreConfig = messageStoreConfig;
    this.consumerOffsetManager = new ConsumerOffsetManager(this);
    this.topicConfigManager = new TopicConfigManager(this);
    this.pullMessageProcessor = new PullMessageProcessor(this);
    this.pullRequestHoldService = new PullRequestHoldService(this);
    this.messageArrivingListener = new NotifyMessageArrivingListener(this.pullRequestHoldService);
    this.consumerIdsChangeListener = new DefaultConsumerIdsChangeListener(this);
    this.consumerManager = new ConsumerManager(this.consumerIdsChangeListener);
    this.producerManager = new ProducerManager();
    this.clientHousekeepingService = new ClientHousekeepingService(this);
    this.broker2Client = new Broker2Client(this);
    this.subscriptionGroupManager = new SubscriptionGroupManager(this);
    this.brokerOuterAPI = new BrokerOuterAPI(nettyClientConfig);
    this.filterServerManager = new FilterServerManager(this);

    if (this.brokerConfig.getNamesrvAddr() != null) {
        this.brokerOuterAPI.updateNameServerAddressList(this.brokerConfig.getNamesrvAddr());
        log.info("user specfied name server address: {}", this.brokerConfig.getNamesrvAddr());
    }

    this.slaveSynchronize = new SlaveSynchronize(this);

    this.sendThreadPoolQueue = new LinkedBlockingQueue<Runnable>(this.brokerConfig.getSendThreadPoolQueueCapacity());

    this.pullThreadPoolQueue = new LinkedBlockingQueue<Runnable>(this.brokerConfig.getPullThreadPoolQueueCapacity());

    this.brokerStatsManager = new BrokerStatsManager(this.brokerConfig.getBrokerClusterName());
    this.setStoreHost(new InetSocketAddress(this.getBrokerConfig().getBrokerIP1(), this.getNettyServerConfig().getListenPort()));
}
 
開發者ID:y123456yz,項目名稱:reading-and-annotate-rocketmq-3.4.6,代碼行數:39,代碼來源:BrokerController.java

示例3: addMessage

import com.alibaba.rocketmq.store.stats.BrokerStatsManager; //導入依賴的package包/類
public void addMessage(final SelectMapedBufferResult mapedBuffer) {
    this.messageMapedList.add(mapedBuffer);
    this.messageBufferList.add(mapedBuffer.getByteBuffer());
    this.bufferTotalSize += mapedBuffer.getSize();
    this.msgCount4Commercial += (int) Math.ceil(
            mapedBuffer.getSize() / BrokerStatsManager.SIZE_PER_COUNT);
}
 
開發者ID:y123456yz,項目名稱:reading-and-annotate-rocketmq-3.4.6,代碼行數:8,代碼來源:GetMessageResult.java

示例4: DefaultMessageStore

import com.alibaba.rocketmq.store.stats.BrokerStatsManager; //導入依賴的package包/類
public DefaultMessageStore(final MessageStoreConfig messageStoreConfig, final BrokerStatsManager brokerStatsManager,
        final MessageArrivingListener messageArrivingListener, final BrokerConfig brokerConfig) throws IOException {
    this.messageArrivingListener = messageArrivingListener;
    this.brokerConfig = brokerConfig;
    this.messageStoreConfig = messageStoreConfig;
    this.brokerStatsManager = brokerStatsManager;
    this.allocateMapedFileService = new AllocateMapedFileService(this);
    this.commitLog = new CommitLog(this);
    this.consumeQueueTable = new ConcurrentHashMap<String/* topic */, ConcurrentHashMap<Integer/* queueId */, ConsumeQueue>>(32);

    this.flushConsumeQueueService = new FlushConsumeQueueService();

    //磁盤超過水位進行清理
    this.cleanCommitLogService = new CleanCommitLogService();
    this.cleanConsumeQueueService = new CleanConsumeQueueService();

    this.storeStatsService = new StoreStatsService();
    this.indexService = new IndexService(this);
    this.haService = new HAService(this);

    //異步構建CQ和索引文件的服務。
    this.reputMessageService = new ReputMessageService();
    //延遲消息投遞服務
    this.scheduleMessageService = new ScheduleMessageService(this);

    this.allocateMapedFileService.start();
    this.indexService.start();
}
 
開發者ID:y123456yz,項目名稱:reading-and-annotate-rocketmq-3.4.6,代碼行數:29,代碼來源:DefaultMessageStore.java

示例5: getBrokerStatsManager

import com.alibaba.rocketmq.store.stats.BrokerStatsManager; //導入依賴的package包/類
public BrokerStatsManager getBrokerStatsManager() {
    return brokerStatsManager;
}
 
開發者ID:y123456yz,項目名稱:reading-and-annotate-rocketmq-3.4.6,代碼行數:4,代碼來源:BrokerController.java

示例6: addMessage

import com.alibaba.rocketmq.store.stats.BrokerStatsManager; //導入依賴的package包/類
public void addMessage(final SelectMapedBufferResult mapedBuffer) {

        this.messageMapedList.add(mapedBuffer);

        this.messageBufferList.add(mapedBuffer.getByteBuffer());

        this.bufferTotalSize += mapedBuffer.getSize();

        this.msgCount4Commercial += (int) Math.ceil(mapedBuffer.getSize() / BrokerStatsManager.SIZE_PER_COUNT);
    }
 
開發者ID:medusar,項目名稱:rocketmq-commet,代碼行數:11,代碼來源:GetMessageResult.java


注:本文中的com.alibaba.rocketmq.store.stats.BrokerStatsManager類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。