Author: timfox
Date: 2009-08-29 10:00:44 -0400 (Sat, 29 Aug 2009)
New Revision: 7931
Modified:
trunk/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java
Log:
minor tweaks
Modified:
trunk/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java
===================================================================
---
trunk/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2009-08-28
10:12:42 UTC (rev 7930)
+++
trunk/src/main/org/hornetq/core/persistence/impl/journal/JournalStorageManager.java 2009-08-29
14:00:44 UTC (rev 7931)
@@ -26,7 +26,6 @@
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executor;
-import java.util.concurrent.atomic.AtomicLong;
import javax.transaction.xa.Xid;
@@ -66,7 +65,6 @@
import org.hornetq.core.transaction.Transaction.State;
import org.hornetq.core.transaction.impl.TransactionImpl;
import org.hornetq.utils.DataConstants;
-import org.hornetq.utils.IDGenerator;
import org.hornetq.utils.Pair;
import org.hornetq.utils.SimpleString;
import org.hornetq.utils.UUID;
@@ -937,8 +935,6 @@
bindingsJournal.load(records, preparedTransactions);
- long lastID = -1;
-
for (RecordInfo record : records)
{
long id = record.id;
@@ -986,14 +982,12 @@
return;
}
-
checkAndCreateDir(bindingsDir, createBindingsDir);
checkAndCreateDir(journalDir, createJournalDir);
checkAndCreateDir(largeMessagesDirectory, createJournalDir);
-
cleanupIncompleteFiles();
bindingsJournal.start();
@@ -1044,7 +1038,7 @@
// This should be accessed from this package only
void deleteFile(final SequentialFile file)
{
- this.executor.execute(new Runnable()
+ executor.execute(new Runnable()
{
public void run()
{
@@ -1381,7 +1375,6 @@
private static class ScheduledDeliveryEncoding extends QueueEncoding
{
-
long scheduledDeliveryTime;
private ScheduledDeliveryEncoding(long scheduledDeliveryTime, long queueID)
Modified: trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java
===================================================================
--- trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java 2009-08-28 10:12:42 UTC
(rev 7930)
+++ trunk/src/main/org/hornetq/core/server/impl/QueueImpl.java 2009-08-29 14:00:44 UTC
(rev 7931)
@@ -1313,7 +1313,9 @@
//TODO - this needs to be optimised!! Creating too much stuff on an inner loop
int totalConsumers = distributionPolicy.getConsumerCount();
Set<Consumer> busyConsumers = new HashSet<Consumer>();
- Set<Consumer> nullReferences = new HashSet<Consumer>();
+ //Set<Consumer> nullReferences = new HashSet<Consumer>();
+
+ int nullCount = 0;
while (true)
{
@@ -1347,8 +1349,9 @@
if (reference == null)
{
- nullReferences.add(consumer);
- if (nullReferences.size() + busyConsumers.size() == totalConsumers)
+ //nullReferences.add(consumer);
+ nullCount++;
+ if (nullCount + busyConsumers.size() == totalConsumers)
{
startDepaging();
// We delivered all the messages - go into direct delivery
@@ -1360,7 +1363,7 @@
}
else
{
- nullReferences.remove(consumer);
+ //nullReferences.remove(consumer);
if (reference.getMessage().isExpired())
{
Show replies by date