Package org.activemq.io.util

Examples of org.activemq.io.util.MemoryBoundedQueue


     */
    public DurableQueueSubscription addConsumer(Filter filter, ConsumerInfo info, BrokerClient client)
            throws JMSException {
        DurableQueueSubscription ts = findMatch(info);
        if (ts == null) {
            MemoryBoundedQueue queue = queueManager.getMemoryBoundedQueue("DURABLE_SUB:-"+info.getConsumerId());
            MemoryBoundedQueue ackQueue = queueManager.getMemoryBoundedQueue("DURABLE_SUB_ACKED:-"+info.getConsumerId());
            ts = new DurableQueueSubscription(client, queue, ackQueue, filter, info);
            synchronized (subscriptionsMutex) {
                idleTimestamp = 0;
                subscriptions.add(ts);
                checkRunning();
View Full Code Here


        Thread.sleep(1000);
        System.out.println("FINAL count = " + messageCount);
        System.out.println(defaultBroker.getQueueManager().dumpContents());
        List list = defaultBroker.getQueueManager().getMemoryBoundedQueues();
        for (Iterator i = list.iterator(); i.hasNext();){
            MemoryBoundedQueue q = (MemoryBoundedQueue)i.next();
            if (q.getLocalMemoryUsedByThisQueue() > 0){
                System.err.println("Queue with enqueued messages at end of test: " + q.getName() + "= " + q.getLocalMemoryUsedByThisQueue());
            }
        }
    }
View Full Code Here

     */
    public TransientQueueSubscription addConsumer(Filter filter,ConsumerInfo info, BrokerClient client) throws JMSException {
        synchronized (subscriptionMutex) {
            TransientQueueSubscription ts = findMatch(info);
            if (ts == null) {
                MemoryBoundedQueue queue = queueManager
                        .getMemoryBoundedQueue("TRANSIENT_QUEUE_SUB:-"
                                + info.getConsumerId());
                MemoryBoundedQueue ackQueue = queueManager
                        .getMemoryBoundedQueue("TRANSIENT_QUEUE_SUB_ACKED:-"
                                + info.getConsumerId());
                ts = new TransientQueueSubscription(client, queue, ackQueue,
                        filter, info);

View Full Code Here

        ActiveMQDestination destination = info.getDestination();
        if (destination.isQueue()) {
            TransientQueueBoundedMessageContainer container = (TransientQueueBoundedMessageContainer) containers
                    .get(destination);
            if (container == null) {
                MemoryBoundedQueue queue = queueManager.getMemoryBoundedQueue(client.toString());
                container = new TransientQueueBoundedMessageContainer(threadPool, queueManager, destination,
                        redeliveryPolicy, deadLetterPolicy);
                addContainer(container);
                if (started.get()) {
                    container.start();
View Full Code Here

            doGarbageCollection();
        }
        TransientQueueBoundedMessageContainer container = (TransientQueueBoundedMessageContainer) containers
                .get(destination);
        if (container == null) {
            MemoryBoundedQueue queue = queueManager.getMemoryBoundedQueue(client.toString());
            container = new TransientQueueBoundedMessageContainer(threadPool, queueManager, destination,
                    redeliveryPolicy, deadLetterPolicy);
            addContainer(container);
            if (started.get()) {
                container.start();
View Full Code Here

        ActiveMQDestination destination = info.getDestination();
        if (destination.isTopic()) {
            TransientTopicBoundedMessageContainer container = (TransientTopicBoundedMessageContainer) containers
                    .get(client);
            if (container == null) {
                MemoryBoundedQueue queue = queueManager.getMemoryBoundedQueue(client.toString());
                container = new TransientTopicBoundedMessageContainer(this, client, queue);
                containers.put(client, container);
                if (started.get()) {
                    container.start();
                }
View Full Code Here

     */
    public DurableQueueSubscription addConsumer(Filter filter, ConsumerInfo info, BrokerClient client)
            throws JMSException {
        DurableQueueSubscription ts = findMatch(info);
        if (ts == null) {
            MemoryBoundedQueue queue = queueManager.getMemoryBoundedQueue("DURABLE_SUB:-"+info.getConsumerId());
            MemoryBoundedQueue ackQueue = queueManager.getMemoryBoundedQueue("DURABLE_SUB_ACKED:-"+info.getConsumerId());
            ts = new DurableQueueSubscription(client, queue, ackQueue, filter, info);
            synchronized (subscriptionsMutex) {
                idleTimestamp = 0;
                subscriptions.add(ts);
                checkRunning();
View Full Code Here

        Thread.sleep(1000);
        System.out.println("FINAL count = " + messageCount);
        System.out.println(defaultBroker.getQueueManager().dumpContents());
        List list = defaultBroker.getQueueManager().getMemoryBoundedQueues();
        for (Iterator i = list.iterator(); i.hasNext();){
            MemoryBoundedQueue q = (MemoryBoundedQueue)i.next();
            if (q.getLocalMemoryUsedByThisQueue() > 0){
                System.err.println("Queue with enqueued messages at end of test: " + q.getName() + "= " + q.getLocalMemoryUsedByThisQueue());
            }
        }
    }
View Full Code Here

     */
    public TransientQueueSubscription addConsumer(Filter filter,ConsumerInfo info, BrokerClient client) throws JMSException {
        synchronized (subscriptionMutex) {
            TransientQueueSubscription ts = findMatch(info);
            if (ts == null) {
                MemoryBoundedQueue queue = queueManager
                        .getMemoryBoundedQueue("TRANSIENT_QUEUE_SUB:-"
                                + info.getConsumerId());
                MemoryBoundedQueue ackQueue = queueManager
                        .getMemoryBoundedQueue("TRANSIENT_QUEUE_SUB_ACKED:-"
                                + info.getConsumerId());
                ts = new TransientQueueSubscription(client, queue, ackQueue,
                        filter, info);

View Full Code Here

     */
    public DurableQueueSubscription addConsumer(Filter filter, ConsumerInfo info, BrokerClient client)
            throws JMSException {
        DurableQueueSubscription ts = findMatch(info);
        if (ts == null) {
            MemoryBoundedQueue queue = queueManager.getMemoryBoundedQueue("DURABLE_SUB:-"+info.getConsumerId());
            MemoryBoundedQueue ackQueue = queueManager.getMemoryBoundedQueue("DURABLE_SUB_ACKED:-"+info.getConsumerId());
            ts = new DurableQueueSubscription(client, queue, ackQueue, filter, info);
            synchronized (subscriptionsMutex) {
                idleTimestamp = 0;
                subscriptions.add(ts);
                checkRunning();
View Full Code Here

TOP

Related Classes of org.activemq.io.util.MemoryBoundedQueue

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.