Search in sources :

Example 1 with MessageCounterManagerImpl

use of org.apache.activemq.artemis.core.messagecounter.impl.MessageCounterManagerImpl in project activemq-artemis by apache.

the class ManagementServiceImpl method registerServer.

@Override
public ActiveMQServerControlImpl registerServer(final PostOffice postOffice, final SecurityStore securityStore, final StorageManager storageManager1, final Configuration configuration, final HierarchicalRepository<AddressSettings> addressSettingsRepository, final HierarchicalRepository<Set<Role>> securityRepository, final ResourceManager resourceManager, final RemotingService remotingService, final ActiveMQServer messagingServer, final QueueFactory queueFactory, final ScheduledExecutorService scheduledThreadPool, final PagingManager pagingManager, final boolean backup) throws Exception {
    this.postOffice = postOffice;
    this.securityStore = securityStore;
    this.addressSettingsRepository = addressSettingsRepository;
    this.securityRepository = securityRepository;
    this.storageManager = storageManager1;
    this.messagingServer = messagingServer;
    this.pagingManager = pagingManager;
    messageCounterManager = new MessageCounterManagerImpl(scheduledThreadPool, messagingServer.getExecutorFactory().getExecutor());
    messageCounterManager.setMaxDayCount(configuration.getMessageCounterMaxDayHistory());
    messageCounterManager.reschedule(configuration.getMessageCounterSamplePeriod());
    messagingServerControl = new ActiveMQServerControlImpl(postOffice, configuration, resourceManager, remotingService, messagingServer, messageCounterManager, storageManager1, broadcaster);
    ObjectName objectName = objectNameBuilder.getActiveMQServerObjectName();
    registerInJMX(objectName, messagingServerControl);
    registerInRegistry(ResourceNames.BROKER, messagingServerControl);
    return messagingServerControl;
}
Also used : MessageCounterManagerImpl(org.apache.activemq.artemis.core.messagecounter.impl.MessageCounterManagerImpl) ActiveMQServerControlImpl(org.apache.activemq.artemis.core.management.impl.ActiveMQServerControlImpl) ObjectName(javax.management.ObjectName)

Aggregations

ObjectName (javax.management.ObjectName)1 ActiveMQServerControlImpl (org.apache.activemq.artemis.core.management.impl.ActiveMQServerControlImpl)1 MessageCounterManagerImpl (org.apache.activemq.artemis.core.messagecounter.impl.MessageCounterManagerImpl)1