Examples of decrementReferenceCount()


Examples of org.apache.activemq.command.Message.decrementReferenceCount()

    public synchronized void destroy() throws Exception {
        stop();
        for (Iterator<MessageReference> i = memoryList.iterator(); i.hasNext();) {
            Message node = (Message)i.next();
            node.decrementReferenceCount();
        }
        memoryList.clear();
        if (!isDiskListEmpty()) {
            getDiskList().clear();
        }
View Full Code Here

Examples of org.apache.activemq.command.Message.decrementReferenceCount()

   
    public final synchronized MessageReference next() {
        Message result = null;
        if (!this.batchList.isEmpty()&&this.iterator.hasNext()) {
            result = this.iterator.next().getValue();
            result.decrementReferenceCount();
        }
        return result;
    }
   
    public final synchronized void addMessageLast(MessageReference node) throws Exception {
View Full Code Here

Examples of org.apache.activemq.command.Message.decrementReferenceCount()

            MessageId id = ack.getLastMessageId();
            Message message = messages.remove(id);
            if (message == null) {
                messageAcks.add(ack);
            } else {
                message.decrementReferenceCount();
            }
        }
    }

    public void replayRemoveMessage(ConnectionContext context, MessageAck messageAck) {
View Full Code Here

Examples of org.apache.activemq.command.Message.decrementReferenceCount()

                            longTermStore.addMessage(context, message);
                        } catch (Throwable e) {
                            LOG.warn("Message could not be added to long term store: " + e.getMessage(), e);
                        }
                        size += message.getSize();
                        message.decrementReferenceCount();
                        // Commit the batch if it's getting too big
                        if (size >= maxCheckpointMessageAddSize) {
                            persitanceAdapter.commitTransaction(context);
                            persitanceAdapter.beginTransaction(context);
                            size = 0;
View Full Code Here

Examples of org.apache.activemq.command.Message.decrementReferenceCount()

    public void removeMessage(MessageId msgId) throws IOException {
        synchronized (messageTable) {
            Message removed = messageTable.remove(msgId);
            if( removed !=null ) {
                removed.decrementReferenceCount();
            }
            if ((lastBatchId != null && lastBatchId.equals(msgId)) || messageTable.isEmpty()) {
                lastBatchId = null;
            }
        }
View Full Code Here

Examples of org.apache.activemq.command.Message.decrementReferenceCount()

    @Override
    public synchronized void destroy() throws Exception {
        stop();
        for (Iterator<MessageReference> i = memoryList.iterator(); i.hasNext();) {
            Message node = (Message) i.next();
            node.decrementReferenceCount();
        }
        memoryList.clear();
        destroyDiskList();
    }
View Full Code Here

Examples of org.apache.activemq.command.Message.decrementReferenceCount()

    @Override
    public synchronized void destroy() throws Exception {
        stop();
        for (Iterator<MessageReference> i = memoryList.iterator(); i.hasNext();) {
            Message node = (Message) i.next();
            node.decrementReferenceCount();
        }
        memoryList.clear();
        destroyDiskList();
    }
View Full Code Here

Examples of org.apache.activemq.command.Message.decrementReferenceCount()

            MessageId id = ack.getLastMessageId();
            Message message = (Message) messages.remove(id);
            if (message == null) {
                messageAcks.add(ack);
            } else {
                message.decrementReferenceCount();
            }
        }
    }
   
    public void replayRemoveMessage(ConnectionContext context, MessageAck messageAck) {
View Full Code Here

Examples of org.apache.activemq.command.Message.decrementReferenceCount()

                        log.warn("Message could not be added to long term store: " + e.getMessage(), e);
                    }
                   
                    size += message.getSize();
                   
                    message.decrementReferenceCount();
                   
                    // Commit the batch if it's getting too big
                    if( size >= maxCheckpointMessageAddSize ) {
                        persitanceAdapter.commitTransaction(context);
                        persitanceAdapter.beginTransaction(context);
View Full Code Here

Examples of org.apache.activemq.command.Message.decrementReferenceCount()

    @Override
    public synchronized void destroy() throws Exception {
        stop();
        for (Iterator<MessageReference> i = memoryList.iterator(); i.hasNext();) {
            Message node = (Message) i.next();
            node.decrementReferenceCount();
        }
        memoryList.clear();
        destroyDiskList();
    }
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.