From ab01ae3818cabc4155e35bc5d18d05066f9f588c Mon Sep 17 00:00:00 2001 From: gtully Date: Mon, 3 Mar 2014 16:20:21 +0000 Subject: [PATCH] fix build revert extras in MessageDatabase from https://git-wip-us.apache.org/repos/asf?p=activemq.git;a=commit;h=69c0d399 - sorry --- .../activemq/store/kahadb/MessageDatabase.java | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java index 78e26a956b..b185d69742 100644 --- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java +++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MessageDatabase.java @@ -2302,7 +2302,6 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe @SuppressWarnings("rawtypes") protected final LinkedHashMap> preparedTransactions = new LinkedHashMap>(); protected final Set ackedAndPrepared = new HashSet(); - protected final Set rolledBackAcks = new HashSet(); // messages that have prepared (pending) acks cannot be re-dispatched unless the outcome is rollback, // till then they are skipped by the store. @@ -2318,16 +2317,12 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe } } - public void forgetRecoveredAcks(ArrayList acks, boolean rollback) throws IOException { + public void forgetRecoveredAcks(ArrayList acks) throws IOException { if (acks != null) { this.indexLock.writeLock().lock(); try { for (MessageAck ack : acks) { - final String id = ack.getLastMessageId().toProducerKey(); - ackedAndPrepared.remove(id); - if (rollback) { - rolledBackAcks.add(id); - } + ackedAndPrepared.remove(ack.getLastMessageId().toProducerKey()); } } finally { this.indexLock.writeLock().unlock(); @@ -2950,12 +2945,6 @@ public abstract class MessageDatabase extends ServiceSupport implements BrokerSe return lastGetPriority; } - public boolean alreadyDispatched(Long sequence) { - return (cursor.highPriorityCursorPosition > 0 && cursor.highPriorityCursorPosition >= sequence) || - (cursor.defaultCursorPosition > 0 && cursor.defaultCursorPosition >= sequence) || - (cursor.lowPriorityCursorPosition > 0 && cursor.lowPriorityCursorPosition >= sequence); - } - class MessageOrderIterator implements Iterator>{ Iterator>currentIterator; final Iterator>highIterator;