当前位置: 首页>>代码示例>>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;未经允许,请勿转载。