Examples of decrementReferenceCount()


Examples of org.apache.activemq.broker.region.MessageReference.decrementReferenceCount()

    public void remove(MessageReference node) {
        for (Iterator<MessageReference> i = list.iterator(); i.hasNext();) {
            MessageReference ref = i.next();
            if (node.getMessageId().equals(ref.getMessageId())) {
                ref.decrementReferenceCount();
                i.remove();
                break;
            }
        }
    }
View Full Code Here

Examples of org.apache.activemq.broker.region.MessageReference.decrementReferenceCount()

    protected synchronized void flushToDisk() {
        if (!memoryList.isEmpty()) {
            while (!memoryList.isEmpty()) {
                MessageReference node = memoryList.removeFirst();
                node.decrementReferenceCount();
                getDiskList().addLast(node);
            }
            memoryList.clear();
        }
    }
View Full Code Here

Examples of org.apache.activemq.broker.region.MessageReference.decrementReferenceCount()

   
    public final synchronized void gc() {
        for (Iterator<MessageReference>i = batchList.iterator();i.hasNext();) {
            MessageReference msg = i.next();
            rollback(msg.getMessageId());
            msg.decrementReferenceCount();
        }
        batchList.clear();
        clearIterator(false);
        batchResetNeeded = true;
        this.cacheEnabled=false;
View Full Code Here

Examples of org.apache.activemq.broker.region.MessageReference.decrementReferenceCount()

    public List<MessageReference> remove(ConnectionContext context, Destination destination) throws Exception {
        List<MessageReference> rc = new ArrayList<MessageReference>();
        for (Iterator<MessageReference> iterator = list.iterator(); iterator.hasNext();) {
            MessageReference r = iterator.next();
            if( r.getRegionDestination()==destination ) {
                r.decrementReferenceCount();
                rc.add(r);
                iterator.remove();
            }
        }
        return rc ;       
View Full Code Here

Examples of org.apache.activemq.broker.region.MessageReference.decrementReferenceCount()

    public synchronized void remove(MessageReference node) {
        for (Iterator<MessageReference> i = list.iterator(); i.hasNext();) {
            MessageReference ref = i.next();
            if (node.getMessageId().equals(ref.getMessageId())) {
                ref.decrementReferenceCount();
                i.remove();
                break;
            }
        }
    }
View Full Code Here

Examples of org.apache.activemq.broker.region.MessageReference.decrementReferenceCount()

    protected synchronized void flushToDisk() {
      
        if (!memoryList.isEmpty()) {
            while (!memoryList.isEmpty()) {
                MessageReference node = memoryList.removeFirst();
                node.decrementReferenceCount();
                getDiskList().addLast(node);
            }
            memoryList.clear();
        }
    }
View Full Code Here

Examples of org.apache.activemq.broker.region.MessageReference.decrementReferenceCount()

   
    public synchronized void gc() {
        for (Iterator<MessageReference>i = batchList.iterator();i.hasNext();) {
            MessageReference msg = i.next();
            rollback(msg.getMessageId());
            msg.decrementReferenceCount();
        }
        batchList.clear();
        clearIterator(false);
        batchResetNeeded = true;
        // wonder do we need to determine size here, it may change before restart
View Full Code Here

Examples of org.apache.activemq.broker.region.MessageReference.decrementReferenceCount()

    protected synchronized void expireOldMessages() {
        if (!memoryList.isEmpty()) {
            for (Iterator<MessageReference> iterator = memoryList.iterator(); iterator.hasNext();) {
                MessageReference node = iterator.next();
                if (node.isExpired()) {
                    node.decrementReferenceCount();
                    discardExpiredMessage(node);
                    iterator.remove();
                }
            }
        }
View Full Code Here

Examples of org.apache.activemq.broker.region.MessageReference.decrementReferenceCount()

                start = System.currentTimeMillis();
                LOG.trace("" + name + ", flushToDisk() mem list size: " +memoryList.size()  + " " (systemUsage != null ? systemUsage.getMemoryUsage() : "") );
             }
            for (Iterator<MessageReference> iterator = memoryList.iterator(); iterator.hasNext();) {
                MessageReference node = iterator.next();
                node.decrementReferenceCount();
                ByteSequence bs;
                try {
                    bs = getByteSequence(node.getMessage());
                    getDiskList().addLast(node.getMessageId().toString(), bs);
                } catch (IOException e) {
View Full Code Here

Examples of org.apache.activemq.broker.region.MessageReference.decrementReferenceCount()

    protected synchronized void flushToDisk() {

        if (!memoryList.isEmpty()) {
            while (!memoryList.isEmpty()) {
                MessageReference node = memoryList.removeFirst();
                node.decrementReferenceCount();
                ByteSequence bs;
                try {
                    bs = getByteSequence(node.getMessage());
                    getDiskList().addLast(node.getMessageId().toString(), bs);
                } catch (IOException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.