@Override public void enableStatistics() { safeGetBroker().getDestinationStatistics().setEnabled(true); }
@Override public void disableStatistics() { safeGetBroker().getDestinationStatistics().setEnabled(false); }
/** * @param brokerService * @param store * @param destination * @param parentStats * @throws Exception */ public BaseDestination(BrokerService brokerService, MessageStore store, ActiveMQDestination destination, DestinationStatistics parentStats) throws Exception { this.brokerService = brokerService; this.broker = brokerService.getBroker(); this.store = store; this.destination = destination; // let's copy the enabled property from the parent DestinationStatistics this.destinationStatistics.setEnabled(parentStats.isEnabled()); this.destinationStatistics.setParent(parentStats); this.systemUsage = new SystemUsage(brokerService.getProducerSystemUsage(), destination.toString()); this.memoryUsage = this.systemUsage.getMemoryUsage(); this.memoryUsage.setUsagePortion(1.0f); this.regionBroker = brokerService.getRegionBroker(); this.scheduler = brokerService.getBroker().getScheduler(); }
protected Broker createRegionBroker(DestinationInterceptor destinationInterceptor) throws IOException { RegionBroker regionBroker; if (isUseJmx()) { try { regionBroker = new ManagedRegionBroker(this, getManagementContext(), getBrokerObjectName(), getTaskRunnerFactory(), getConsumerSystemUsage(), destinationFactory, destinationInterceptor,getScheduler(),getExecutor()); } catch(MalformedObjectNameException me){ LOG.warn("Cannot create ManagedRegionBroker due " + me.getMessage(), me); throw new IOException(me); } } else { regionBroker = new RegionBroker(this, getTaskRunnerFactory(), getConsumerSystemUsage(), destinationFactory, destinationInterceptor,getScheduler(),getExecutor()); } destinationFactory.setRegionBroker(regionBroker); regionBroker.setKeepDurableSubsActive(keepDurableSubsActive); regionBroker.setBrokerName(getBrokerName()); regionBroker.getDestinationStatistics().setEnabled(enableStatistics); regionBroker.setAllowTempAutoCreationOnSend(isAllowTempAutoCreationOnSend()); if (brokerId != null) { regionBroker.setBrokerId(brokerId); } return regionBroker; }
public void enableStatistics() { broker.getDestinationStatistics().setEnabled(true); }
public void disableStatistics() { broker.getDestinationStatistics().setEnabled(false); }
@Override public void enableStatistics() { safeGetBroker().getDestinationStatistics().setEnabled(true); }
@Override public void disableStatistics() { safeGetBroker().getDestinationStatistics().setEnabled(false); }
@Override public void disableStatistics() { safeGetBroker().getDestinationStatistics().setEnabled(false); }
@Override public void enableStatistics() { safeGetBroker().getDestinationStatistics().setEnabled(true); }
@Override public void enableStatistics() { safeGetBroker().getDestinationStatistics().setEnabled(true); }
@Override public void disableStatistics() { safeGetBroker().getDestinationStatistics().setEnabled(false); }
/** * @param broker * @param store * @param destination * @param parentStats * @throws Exception */ public BaseDestination(BrokerService brokerService, MessageStore store, ActiveMQDestination destination, DestinationStatistics parentStats) throws Exception { this.brokerService = brokerService; this.broker = brokerService.getBroker(); this.store = store; this.destination = destination; // let's copy the enabled property from the parent DestinationStatistics this.destinationStatistics.setEnabled(parentStats.isEnabled()); this.destinationStatistics.setParent(parentStats); this.systemUsage = new SystemUsage(brokerService.getProducerSystemUsage(), destination.toString()); this.memoryUsage = this.systemUsage.getMemoryUsage(); this.memoryUsage.setUsagePortion(1.0f); this.regionBroker = brokerService.getRegionBroker(); }
/** * @param brokerService * @param store * @param destination * @param parentStats * @throws Exception */ public BaseDestination(BrokerService brokerService, MessageStore store, ActiveMQDestination destination, DestinationStatistics parentStats) throws Exception { this.brokerService = brokerService; this.broker = brokerService.getBroker(); this.store = store; this.destination = destination; // let's copy the enabled property from the parent DestinationStatistics this.destinationStatistics.setEnabled(parentStats.isEnabled()); this.destinationStatistics.setParent(parentStats); this.systemUsage = new SystemUsage(brokerService.getProducerSystemUsage(), destination.toString()); this.memoryUsage = this.systemUsage.getMemoryUsage(); this.memoryUsage.setUsagePortion(1.0f); this.regionBroker = brokerService.getRegionBroker(); this.scheduler = brokerService.getBroker().getScheduler(); }
/** * @param brokerService * @param store * @param destination * @param parentStats * @throws Exception */ public BaseDestination(BrokerService brokerService, MessageStore store, ActiveMQDestination destination, DestinationStatistics parentStats) throws Exception { this.brokerService = brokerService; this.broker = brokerService.getBroker(); this.store = store; this.destination = destination; // let's copy the enabled property from the parent DestinationStatistics this.destinationStatistics.setEnabled(parentStats.isEnabled()); this.destinationStatistics.setParent(parentStats); this.systemUsage = new SystemUsage(brokerService.getProducerSystemUsage(), destination.toString()); this.memoryUsage = this.systemUsage.getMemoryUsage(); this.memoryUsage.setUsagePortion(1.0f); this.regionBroker = brokerService.getRegionBroker(); this.scheduler = brokerService.getBroker().getScheduler(); }
/** * @param brokerService * @param store * @param destination * @param parentStats * @throws Exception */ public BaseDestination(BrokerService brokerService, MessageStore store, ActiveMQDestination destination, DestinationStatistics parentStats) throws Exception { this.brokerService = brokerService; this.broker = brokerService.getBroker(); this.store = store; this.destination = destination; // let's copy the enabled property from the parent DestinationStatistics this.destinationStatistics.setEnabled(parentStats.isEnabled()); this.destinationStatistics.setParent(parentStats); this.systemUsage = new SystemUsage(brokerService.getProducerSystemUsage(), destination.toString()); this.memoryUsage = this.systemUsage.getMemoryUsage(); this.memoryUsage.setUsagePortion(1.0f); this.regionBroker = brokerService.getRegionBroker(); this.scheduler = brokerService.getBroker().getScheduler(); }
protected Broker createRegionBroker(DestinationInterceptor destinationInterceptor) throws IOException { RegionBroker regionBroker; if (isUseJmx()) { try { regionBroker = new ManagedRegionBroker(this, getManagementContext(), getBrokerObjectName(), getTaskRunnerFactory(), getConsumerSystemUsage(), destinationFactory, destinationInterceptor,getScheduler(),getExecutor()); } catch(MalformedObjectNameException me){ LOG.warn("Cannot create ManagedRegionBroker due " + me.getMessage(), me); throw new IOException(me); } } else { regionBroker = new RegionBroker(this, getTaskRunnerFactory(), getConsumerSystemUsage(), destinationFactory, destinationInterceptor,getScheduler(),getExecutor()); } destinationFactory.setRegionBroker(regionBroker); regionBroker.setKeepDurableSubsActive(keepDurableSubsActive); regionBroker.setBrokerName(getBrokerName()); regionBroker.getDestinationStatistics().setEnabled(enableStatistics); regionBroker.setAllowTempAutoCreationOnSend(isAllowTempAutoCreationOnSend()); if (brokerId != null) { regionBroker.setBrokerId(brokerId); } return regionBroker; }
protected Broker createRegionBroker(DestinationInterceptor destinationInterceptor) throws IOException { RegionBroker regionBroker; if (isUseJmx()) { try { regionBroker = new ManagedRegionBroker(this, getManagementContext(), getBrokerObjectName(), getTaskRunnerFactory(), getConsumerSystemUsage(), destinationFactory, destinationInterceptor,getScheduler(),getExecutor()); } catch(MalformedObjectNameException me){ LOG.warn("Cannot create ManagedRegionBroker due " + me.getMessage(), me); throw new IOException(me); } } else { regionBroker = new RegionBroker(this, getTaskRunnerFactory(), getConsumerSystemUsage(), destinationFactory, destinationInterceptor,getScheduler(),getExecutor()); } destinationFactory.setRegionBroker(regionBroker); regionBroker.setKeepDurableSubsActive(keepDurableSubsActive); regionBroker.setBrokerName(getBrokerName()); regionBroker.getDestinationStatistics().setEnabled(enableStatistics); regionBroker.setAllowTempAutoCreationOnSend(isAllowTempAutoCreationOnSend()); if (brokerId != null) { regionBroker.setBrokerId(brokerId); } return regionBroker; }
protected Broker createRegionBroker(DestinationInterceptor destinationInterceptor) throws IOException { RegionBroker regionBroker; if (isUseJmx()) { try { regionBroker = new ManagedRegionBroker(this, getManagementContext(), getBrokerObjectName(), getTaskRunnerFactory(), getConsumerSystemUsage(), destinationFactory, destinationInterceptor,getScheduler(),getExecutor()); } catch(MalformedObjectNameException me){ LOG.warn("Cannot create ManagedRegionBroker due " + me.getMessage(), me); throw new IOException(me); } } else { regionBroker = new RegionBroker(this, getTaskRunnerFactory(), getConsumerSystemUsage(), destinationFactory, destinationInterceptor,getScheduler(),getExecutor()); } destinationFactory.setRegionBroker(regionBroker); regionBroker.setKeepDurableSubsActive(keepDurableSubsActive); regionBroker.setBrokerName(getBrokerName()); regionBroker.getDestinationStatistics().setEnabled(enableStatistics); regionBroker.setAllowTempAutoCreationOnSend(isAllowTempAutoCreationOnSend()); if (brokerId != null) { regionBroker.setBrokerId(brokerId); } return regionBroker; }
protected Broker createRegionBroker(DestinationInterceptor destinationInterceptor) throws IOException { RegionBroker regionBroker; if (isUseJmx()) { regionBroker = new ManagedRegionBroker(this, getManagementContext(), getBrokerObjectName(), getTaskRunnerFactory(), getConsumerSystemUsage(), destinationFactory, destinationInterceptor,getScheduler(),getExecutor()); } else { regionBroker = new RegionBroker(this, getTaskRunnerFactory(), getConsumerSystemUsage(), destinationFactory, destinationInterceptor,getScheduler(),getExecutor()); } destinationFactory.setRegionBroker(regionBroker); regionBroker.setKeepDurableSubsActive(keepDurableSubsActive); regionBroker.setBrokerName(getBrokerName()); regionBroker.getDestinationStatistics().setEnabled(enableStatistics); if (brokerId != null) { regionBroker.setBrokerId(brokerId); } return regionBroker; }