Package org.apache.activemq.usage

Examples of org.apache.activemq.usage.MemoryUsage


    public void createBroker(Configurer configurer) throws Exception {
        broker = new BrokerService();
        configurePersistenceAdapter(broker);
       
        SystemUsage usage = new SystemUsage();
        MemoryUsage memoryUsage = new MemoryUsage();
        memoryUsage.setLimit(MESSAGE_LENGTH_BYTES * 200 * NUM_SENDERS_AND_RECEIVERS);
        usage.setMemoryUsage(memoryUsage);
        broker.setSystemUsage(usage);
       
       

View Full Code Here


        pMap.setDefaultEntry(policy);
        answer.setDestinationPolicy(pMap);
        answer.setDeleteAllMessagesOnStartup(true);
        answer.addConnector(bindAddress);

        MemoryUsage memoryUsage = new MemoryUsage();
        memoryUsage.setLimit(MEMORY_USAGE);
        memoryUsage.setPercentUsageMinDelta(20);

        TempUsage tempUsage = new TempUsage();
        tempUsage.setLimit(TEMP_USAGE);

        StoreUsage storeUsage = new StoreUsage();
View Full Code Here

        broker = new BrokerService();
        AMQPersistenceAdapterFactory persistenceFactory = new AMQPersistenceAdapterFactory();
        persistenceFactory.setDataDirectory(dataDirFile);
       
        SystemUsage usage = new SystemUsage();
        MemoryUsage memoryUsage = new MemoryUsage();
        memoryUsage.setLimit(MESSAGE_LENGTH_BYTES * 200 * NUM_SENDERS_AND_RECEIVERS);
        usage.setMemoryUsage(memoryUsage);
        broker.setSystemUsage(usage);
       
        broker.setPersistenceFactory(persistenceFactory);

View Full Code Here

        broker.setDestinationPolicy(policyMap);
        // Set destinations
        broker.setDestinations(new ActiveMQDestination[] { destination });
        // Set system usage
        SystemUsage memoryManager = new SystemUsage();
        MemoryUsage memoryUsage = new MemoryUsage();
        memoryUsage.setLimit(TEN_MB);
        memoryManager.setMemoryUsage(memoryUsage);
        StoreUsage storeUsage = new StoreUsage();
        storeUsage.setLimit(TWENTY_MB);
        memoryManager.setStoreUsage(storeUsage);
        TempUsage tempDiskUsage = new TempUsage();
View Full Code Here

        this.info.setDestination(destination);

        // Enable producer window flow control if protocol > 3 and the window
        // size > 0
        if (session.connection.getProtocolVersion() >= 3 && this.info.getWindowSize() > 0) {
            producerWindow = new MemoryUsage("Producer Window: " + producerId);
            producerWindow.setLimit(this.info.getWindowSize());
            producerWindow.start();
        }

        this.defaultDeliveryMode = Message.DEFAULT_DELIVERY_MODE;
View Full Code Here

        pMap.setDefaultEntry(policy);
        answer.setDestinationPolicy(pMap);
        answer.setDeleteAllMessagesOnStartup(true);
        answer.addConnector(bindAddress);

        MemoryUsage memoryUsage = new MemoryUsage();
        memoryUsage.setLimit(MEMORY_USAGE);
        memoryUsage.setPercentUsageMinDelta(20);

        TempUsage tempUsage = new TempUsage();
        tempUsage.setLimit(TEMP_USAGE);

        StoreUsage storeUsage = new StoreUsage();
View Full Code Here

        File tmpDir = new File(directory, "tmp");
        IOHelper.deleteChildren(tmpDir);
        Store tempStore = new org.apache.activemq.kaha.impl.KahaStore(tmpDir, "rw");

        SystemUsage sysUsage = new SystemUsage("mySysUsage", persistence, tempStore);
        MemoryUsage memUsage = new MemoryUsage();
        memUsage.setLimit((1024 * 1024));
        StoreUsage storeUsage = new StoreUsage();
        storeUsage.setLimit((1024 * 1024) * 38);
        TempUsage tmpUsage = new TempUsage();
        tmpUsage.setLimit((1024 * 1024) * 38);

 
View Full Code Here

        this.info.setDestination(destination);

        // Enable producer window flow control if protocol > 3 and the window
        // size > 0
        if (session.connection.getProtocolVersion() >= 3 && this.info.getWindowSize() > 0) {
            producerWindow = new MemoryUsage("Producer Window: " + producerId);
            producerWindow.setExecutor(session.getConnectionExecutor());
            producerWindow.setLimit(this.info.getWindowSize());
            producerWindow.start();
        }
View Full Code Here

        this.info.setDestination(destination);

        // Enable producer window flow control if protocol >= 3 and the window size > 0
        if (session.connection.getProtocolVersion() >= 3 && this.info.getWindowSize() > 0) {
            producerWindow = new MemoryUsage("Producer Window: " + producerId);
            producerWindow.setExecutor(session.getConnectionExecutor());
            producerWindow.setLimit(this.info.getWindowSize());
            producerWindow.start();
        }
View Full Code Here

        // let's copy the enabled property from the parent DestinationStatistics
        this.destinationStatistics.setEnabled(parentStats.isEnabled());
        this.destinationStatistics.setParent(parentStats);       

        this.systemUsage = brokerService.getProducerSystemUsage();
        this.memoryUsage = new MemoryUsage(systemUsage.getMemoryUsage(), destination.toString());
        this.memoryUsage.setUsagePortion(1.0f);
        this.regionBroker = brokerService.getRegionBroker();
    }
View Full Code Here

TOP

Related Classes of org.apache.activemq.usage.MemoryUsage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.