Author: borges
Date: 2011-10-05 12:46:27 -0400 (Wed, 05 Oct 2011)
New Revision: 11475
Modified:
branches/HORNETQ-720_Replication/
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientConsumerImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientConsumerInternal.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientLargeMessageImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientProducerCreditsImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientProducerImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/CompressedLargeMessageControllerImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileDeploymentManager.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/management/impl/AcceptorControlImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/management/impl/QueueControlImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PagePositionImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/nullpm/NullStorageLargeServerMessage.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/nullpm/NullStorageManager.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/postoffice/impl/DuplicateIDCacheImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/RoutingContext.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/RoutingContextImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/ScheduledDeliveryHandlerImpl.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/utils/XMLUtil.java
branches/HORNETQ-720_Replication/tests/timing-tests/src/test/java/org/hornetq/tests/timing/core/journal/impl/NIOJournalImplTest.java
branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/client/impl/LargeMessageBufferTest.java
Log:
merge from trunk
Property changes on: branches/HORNETQ-720_Replication
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:10878-11463
+ /trunk:10878-11474
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientConsumerImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientConsumerImpl.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientConsumerImpl.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -50,9 +50,9 @@
private static final boolean trace = ClientConsumerImpl.log.isTraceEnabled();
- public static final long CLOSE_TIMEOUT_MILLISECONDS = 10000;
+ private static final long CLOSE_TIMEOUT_MILLISECONDS = 10000;
- public static final int NUM_PRIORITIES = 10;
+ private static final int NUM_PRIORITIES = 10;
public static final SimpleString FORCED_DELIVERY_MESSAGE = new
SimpleString("_hornetq.forced.delivery.seq");
@@ -405,11 +405,6 @@
return closed;
}
- public void stop() throws HornetQException
- {
- stop(true);
- }
-
public void stop(final boolean waitForOnMessage) throws HornetQException
{
waitForOnMessageToComplete(waitForOnMessage);
@@ -450,12 +445,6 @@
// ClientConsumerInternal implementation
// --------------------------------------------------------------
-
- public ClientSessionInternal getSession()
- {
- return session;
- }
-
public SessionQueueQueryResponseMessage getQueueInfo()
{
return queueInfo;
@@ -642,11 +631,11 @@
}
}
- /**
- *
+ /**
+ *
* LargeMessageBuffer will call flowcontrol here, while other handleMessage will also
be calling flowControl.
* So, this operation needs to be atomic.
- *
+ *
* @param discountSlowConsumer When dealing with slowConsumers, we need to discount
one credit that was pre-sent when the first receive was called. For largeMessage that is
only done at the latest packet
*/
public void flowControl(final int messageBytes, final boolean discountSlowConsumer)
throws HornetQException
@@ -707,7 +696,7 @@
// Private
//
---------------------------------------------------------------------------------------
- /**
+ /**
* Sending a initial credit for slow consumers
* */
private void startSlowConsumer()
@@ -741,7 +730,7 @@
{
ClientConsumerImpl.log.trace("Adding Runner on Executor for
delivery");
}
-
+
sessionExecutor.execute(runner);
}
@@ -824,7 +813,7 @@
//Ignore, this could be a relic from a previous receiveImmediate();
return;
}
-
+
boolean expired = message.isExpired();
flowControlBeforeConsumption(message);
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientConsumerInternal.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientConsumerInternal.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientConsumerInternal.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -60,13 +60,9 @@
void flushAcks() throws HornetQException;
- void stop() throws HornetQException;
-
void stop(boolean waitForOnMessage) throws HornetQException;
void start();
SessionQueueQueryResponseMessage getQueueInfo();
-
- ClientSessionInternal getSession();
}
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientLargeMessageImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientLargeMessageImpl.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientLargeMessageImpl.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -23,9 +23,10 @@
import org.hornetq.utils.DataConstants;
/**
- * ClientLargeMessageImpl is only created when receiving large messages. At the time of
sending a regular Message is sent as we won't know the message is considered large
+ * ClientLargeMessageImpl is only created when receiving large messages.
+ * <p>
+ * At the time of sending a regular Message is sent as we won't know the message is
considered large
* until the buffer is filled up or the user set a streaming.
- *
* @author clebertsuconic
*/
public class ClientLargeMessageImpl extends ClientMessageImpl implements
ClientLargeMessageInternal
@@ -209,11 +210,11 @@
// Inner classes -------------------------------------------------
- protected class HornetQOutputStream extends OutputStream
+ private class HornetQOutputStream extends OutputStream
{
- HornetQBuffer bufferOut;
+ private final HornetQBuffer bufferOut;
- HornetQOutputStream(HornetQBuffer out)
+ private HornetQOutputStream(HornetQBuffer out)
{
this.bufferOut = out;
}
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientProducerCreditsImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientProducerCreditsImpl.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientProducerCreditsImpl.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -25,7 +25,7 @@
*
*
*/
-public class ClientProducerCreditsImpl implements ClientProducerCredits
+class ClientProducerCreditsImpl implements ClientProducerCredits
{
private static final Logger log = Logger.getLogger(ClientProducerCreditsImpl.class);
@@ -38,10 +38,10 @@
private final ClientSessionInternal session;
private int arriving;
-
+
private int refCount;
-
- public ClientProducerCreditsImpl(final ClientSessionInternal session,
+
+ ClientProducerCreditsImpl(final ClientSessionInternal session,
final SimpleString address,
final int windowSize)
{
@@ -73,7 +73,7 @@
{
arriving -= credits;
}
-
+
semaphore.release(credits);
}
@@ -84,7 +84,7 @@
semaphore.drainPermits();
int beforeFailure = arriving;
-
+
arriving = 0;
// If we are waiting for more credits than what's configured, then we need to
use what we tried before
@@ -98,22 +98,22 @@
semaphore.release(Integer.MAX_VALUE / 2);
}
-
+
public synchronized void incrementRefCount()
{
refCount++;
}
-
+
public synchronized int decrementRefCount()
{
return --refCount;
}
-
+
public synchronized void releaseOutstanding()
{
semaphore.drainPermits();
}
-
+
private void checkCredits(final int credits)
{
int needed = Math.max(credits, windowSize);
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientProducerImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientProducerImpl.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientProducerImpl.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -36,13 +36,13 @@
/**
* The client-side Producer connectionFactory class.
- *
+ *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
* @author <a href="mailto:clebert.suconic@jboss.org">Clebert
Suconic</a>
* @author <a href="mailto:ataylor@redhat.com">Andy Taylor</a>
* @version <tt>$Revision$</tt> $Id$
*/
-public class ClientProducerImpl implements ClientProducerInternal
+class ClientProducerImpl implements ClientProducerInternal
{
// Constants
------------------------------------------------------------------------------------
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionFactoryImpl.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -145,7 +145,7 @@
private volatile boolean closed;
- public final Exception e = new Exception();
+ private final Exception e = new Exception();
private final Object waitLock = new Object();
@@ -155,7 +155,7 @@
// Constructors
// ---------------------------------------------------------------------------------
- public ClientSessionFactoryImpl(final ServerLocatorInternal serverLocator,
+ ClientSessionFactoryImpl(final ServerLocatorInternal serverLocator,
final TransportConfiguration connectorConfig,
final long callTimeout,
final long clientFailureCheckPeriod,
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionImpl.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/ClientSessionImpl.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -95,13 +95,8 @@
* @author <a href="mailto:jmesnil@redhat.com">Jeff Mesnil</a>
*
* @author <a href="mailto:ataylor@redhat.com">Andy Taylor</a>
- *
- * @version <tt>$Revision: 3603 $</tt> $Id: ClientSessionImpl.java 3603
2008-01-21 18:49:20Z timfox $
- *
- * $Id: ClientSessionImpl.java 3603 2008-01-21 18:49:20Z timfox $
- *
*/
-public class ClientSessionImpl implements ClientSessionInternal, FailureListener,
CommandConfirmationHandler
+class ClientSessionImpl implements ClientSessionInternal, FailureListener,
CommandConfirmationHandler
{
// Constants
----------------------------------------------------------------------------
@@ -195,7 +190,7 @@
// Constructors
----------------------------------------------------------------------------
- public ClientSessionImpl(final ClientSessionFactoryInternal sessionFactory,
+ ClientSessionImpl(final ClientSessionFactoryInternal sessionFactory,
final String name,
final String username,
final String password,
@@ -665,7 +660,7 @@
stop(true);
}
- public void stop(final boolean waitForOnMessage) throws HornetQException
+ private void stop(final boolean waitForOnMessage) throws HornetQException
{
checkClosed();
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/CompressedLargeMessageControllerImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/CompressedLargeMessageControllerImpl.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/client/impl/CompressedLargeMessageControllerImpl.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -40,7 +40,7 @@
*
*
*/
-public class CompressedLargeMessageControllerImpl implements LargeMessageController
+class CompressedLargeMessageControllerImpl implements LargeMessageController
{
// Constants -----------------------------------------------------
@@ -51,13 +51,13 @@
// Attributes ----------------------------------------------------
- final LargeMessageController bufferDelegate;
-
+ private final LargeMessageController bufferDelegate;
+
// Static --------------------------------------------------------
// Constructors --------------------------------------------------
- public CompressedLargeMessageControllerImpl(final LargeMessageController
bufferDelegate)
+ CompressedLargeMessageControllerImpl(final LargeMessageController bufferDelegate)
{
this.bufferDelegate = bufferDelegate;
}
@@ -66,7 +66,7 @@
// Public --------------------------------------------------------
/**
- *
+ *
*/
public void discardUnusedPackets()
{
@@ -104,7 +104,7 @@
}
/**
- *
+ *
* @param timeWait Milliseconds to Wait. 0 means forever
* @throws Exception
*/
@@ -130,9 +130,9 @@
{
return -1;
}
-
+
DataInputStream dataInput = null;
-
+
private DataInputStream getStream()
{
if (dataInput == null)
@@ -140,18 +140,18 @@
try
{
InputStream input = new HornetQBufferInputStream(bufferDelegate);
-
+
dataInput = new DataInputStream(new InflaterReader(input));
}
catch (Exception e)
{
throw new RuntimeException (e.getMessage(), e);
}
-
+
}
return dataInput;
}
-
+
private void positioningNotSupported()
{
throw new IllegalStateException("Position not supported over compressed large
messages");
@@ -300,9 +300,9 @@
positioningNotSupported();
return 0;
}
-
-
+
+
public int getUnsignedMedium(final long index)
{
positioningNotSupported();
@@ -579,7 +579,7 @@
{
try
{
- return (short)getStream().readShort();
+ return getStream().readShort();
}
catch (Exception e)
{
@@ -591,7 +591,7 @@
{
try
{
- return (int)getStream().readUnsignedShort();
+ return getStream().readUnsignedShort();
}
catch (Exception e)
{
@@ -609,7 +609,7 @@
return value;
}
-
+
public int readUnsignedMedium()
{
return (readByte() & 0xff) << 16 | (readByte() & 0xff) << 8 |
(readByte() & 0xff) << 0;
@@ -708,7 +708,7 @@
public void skipBytes(final int length)
{
-
+
try
{
for (int i = 0 ; i < length; i++)
@@ -827,7 +827,7 @@
{
return (char)readShort();
}
-
+
public char getChar(final int index)
{
return (char)getShort(index);
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileDeploymentManager.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileDeploymentManager.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/deployers/impl/FileDeploymentManager.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -227,7 +227,7 @@
}
}
}
- List<Pair> toRemove = new ArrayList<Pair>();
+ List<Pair<URL, Deployer>> toRemove = new ArrayList<Pair<URL,
Deployer>>();
for (Map.Entry<Pair<URL, Deployer>, DeployInfo> entry :
deployed.entrySet())
{
Pair<URL, Deployer> pair = entry.getKey();
@@ -246,7 +246,7 @@
}
}
}
- for (Pair pair : toRemove)
+ for (Pair<URL, Deployer> pair : toRemove)
{
deployed.remove(pair);
}
@@ -271,7 +271,7 @@
/**
* Checks if the URL is among the current thread context class loader's
resources.
- *
+ *
* We do not check that the corresponding file exists using File.exists() directly as
it would fail
* in the case the resource is loaded from inside an EAR file (see
https://jira.jboss.org/jira/browse/HORNETQ-122)
*/
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/management/impl/AcceptorControlImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/management/impl/AcceptorControlImpl.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/management/impl/AcceptorControlImpl.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -19,7 +19,6 @@
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.management.AcceptorControl;
-import org.hornetq.api.core.management.AddressControl;
import org.hornetq.core.persistence.StorageManager;
import org.hornetq.spi.core.remoting.Acceptor;
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/management/impl/QueueControlImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/management/impl/QueueControlImpl.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/management/impl/QueueControlImpl.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -15,7 +15,6 @@
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -406,14 +405,14 @@
{
while (iterator.hasNext())
{
- MessageReference ref = (MessageReference)iterator.next();
+ MessageReference ref = iterator.next();
if (filter == null || filter.match(ref.getMessage()))
{
Message message = ref.getMessage();
messages.add(message.toMap());
}
}
- return (Map<String, Object>[])messages.toArray(new
Map[messages.size()]);
+ return messages.toArray(new Map[messages.size()]);
}
finally
{
@@ -465,7 +464,7 @@
int count = 0;
while (iterator.hasNext())
{
- MessageReference ref = (MessageReference)iterator.next();
+ MessageReference ref = iterator.next();
if (filter.match(ref.getMessage()))
{
count++;
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PagePositionImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PagePositionImpl.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/paging/cursor/impl/PagePositionImpl.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -13,17 +13,12 @@
package org.hornetq.core.paging.cursor.impl;
-import java.lang.ref.WeakReference;
-
-import org.hornetq.core.paging.cursor.PageCache;
import org.hornetq.core.paging.cursor.PagePosition;
/**
* A PagePosition
*
* @author <a href="mailto:clebert.suconic@jboss.org">Clebert
Suconic</a>
- *
- *
*/
public class PagePositionImpl implements PagePosition
{
@@ -171,7 +166,5 @@
{
return "PagePositionImpl [pageNr=" + pageNr + ", messageNr=" +
messageNr + ", recordID=" + recordID + "]";
}
-
-
}
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/nullpm/NullStorageLargeServerMessage.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/nullpm/NullStorageLargeServerMessage.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/nullpm/NullStorageLargeServerMessage.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -74,15 +74,6 @@
// nothing to be done here.. we don really have a file on this Storage
}
- /* (non-Javadoc)
- * @see org.hornetq.core.server.LargeServerMessage#complete()
- */
- public void complete() throws Exception
- {
- // nothing to be done here.. we don really have a file on this Storage
-
- }
-
@Override
public boolean isLargeMessage()
{
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/nullpm/NullStorageManager.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/nullpm/NullStorageManager.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/persistence/impl/nullpm/NullStorageManager.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -109,11 +109,6 @@
}
};
- public void sync()
- {
- // NO OP
- }
-
public void addQueueBinding(final Binding queueBinding) throws Exception
{
}
@@ -152,10 +147,6 @@
{
}
- public void storeMessageReferenceScheduled(final long queueID, final long messageID,
final long scheduledDeliveryTime) throws Exception
- {
- }
-
public void storeAcknowledgeTransactional(final long txID, final long queueID, final
long messageiD) throws Exception
{
}
@@ -164,10 +155,6 @@
{
}
- public void deletePageTransactional(final long txID, final long messageID) throws
Exception
- {
- }
-
public void storeMessage(final ServerMessage message) throws Exception
{
}
@@ -188,10 +175,6 @@
{
}
- public void updatePageTransaction(final long txID, final PageTransactionInfo
pageTransaction) throws Exception
- {
- }
-
public void updateDeliveryCount(final MessageReference ref) throws Exception
{
}
@@ -207,10 +190,6 @@
{
}
- public void updateDuplicateID(final SimpleString address, final byte[] duplID, final
long recordID) throws Exception
- {
- }
-
public void updateDuplicateIDTransactional(final long txID,
final SimpleString address,
final byte[] duplID,
@@ -329,13 +308,6 @@
}
/* (non-Javadoc)
- * @see org.hornetq.core.persistence.StorageManager#completeReplication()
- */
- public void completeOperations()
- {
- }
-
- /* (non-Javadoc)
* @see
org.hornetq.core.persistence.StorageManager#pageClosed(org.hornetq.utils.SimpleString,
int)
*/
public void pageClosed(final SimpleString storeName, final int pageNumber)
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/postoffice/impl/DuplicateIDCacheImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/postoffice/impl/DuplicateIDCacheImpl.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/postoffice/impl/DuplicateIDCacheImpl.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -14,8 +14,6 @@
package org.hornetq.core.postoffice.impl;
import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -26,7 +24,6 @@
import org.hornetq.core.persistence.StorageManager;
import org.hornetq.core.postoffice.DuplicateIDCache;
import org.hornetq.core.server.MessageReference;
-import org.hornetq.core.server.Queue;
import org.hornetq.core.transaction.Transaction;
import org.hornetq.core.transaction.TransactionOperation;
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/RoutingContext.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/RoutingContext.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/RoutingContext.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -16,7 +16,6 @@
import java.util.List;
import java.util.Map;
-import org.hornetq.api.core.Pair;
import org.hornetq.api.core.SimpleString;
import org.hornetq.core.transaction.Transaction;
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/RoutingContextImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/RoutingContextImpl.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/RoutingContextImpl.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -15,11 +15,9 @@
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import org.hornetq.api.core.Pair;
import org.hornetq.api.core.SimpleString;
import org.hornetq.core.server.Queue;
import org.hornetq.core.server.RouteContextList;
@@ -37,7 +35,7 @@
{
// The pair here is Durable and NonDurable
- private Map<SimpleString, RouteContextList> map = new HashMap<SimpleString,
RouteContextList>();
+ private final Map<SimpleString, RouteContextList> map = new
HashMap<SimpleString, RouteContextList>();
private Transaction transaction;
@@ -121,9 +119,9 @@
private class ContextListing implements RouteContextList
{
- private List<Queue> durableQueue = new ArrayList<Queue>(1);
+ private final List<Queue> durableQueue = new ArrayList<Queue>(1);
- private List<Queue> nonDurableQueue = new ArrayList<Queue>(1);
+ private final List<Queue> nonDurableQueue = new ArrayList<Queue>(1);
public int getNumberOfQueues()
{
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/ScheduledDeliveryHandlerImpl.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/ScheduledDeliveryHandlerImpl.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/server/impl/ScheduledDeliveryHandlerImpl.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -17,7 +17,6 @@
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
-import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
@@ -45,7 +44,7 @@
private final Object lockDelivery = new Object();
- private LinkedList<MessageReference> scheduledReferences = new
LinkedList<MessageReference>();
+ private final LinkedList<MessageReference> scheduledReferences = new
LinkedList<MessageReference>();
public ScheduledDeliveryHandlerImpl(final ScheduledExecutorService scheduledExecutor)
{
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/core/settings/impl/HierarchicalObjectRepository.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -47,7 +47,7 @@
* all the matches
*/
private final Map<String, Match<T>> matches = new HashMap<String,
Match<T>>();
-
+
/**
* Certain values cannot be removed after installed.
* This is because we read a few records from the main config.
@@ -72,13 +72,13 @@
*/
private final ArrayList<HierarchicalRepositoryChangeListener> listeners = new
ArrayList<HierarchicalRepositoryChangeListener>();
-
+
public void addMatch(final String match, final T value)
{
addMatch(match, value, false);
}
-
+
/**
* Add a new match to the repository
*
@@ -98,7 +98,7 @@
matches.put(match, match1);
onChange();
}
-
+
public int getCacheSize()
{
return cache.size();
@@ -149,7 +149,7 @@
}
else
{
- ((Mergeable)actualMatch).merge(match.getValue());
+ ((Mergeable<T>)actualMatch).merge(match.getValue());
}
}
@@ -220,7 +220,7 @@
listeners.clear();
matches.clear();
}
-
+
public void clearCache()
{
cache.clear();
Modified:
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/utils/XMLUtil.java
===================================================================
---
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/utils/XMLUtil.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/hornetq-core/src/main/java/org/hornetq/utils/XMLUtil.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -331,8 +331,8 @@
NodeList nl2 = node2.getChildNodes();
short[] toFilter = new short[] { Node.TEXT_NODE, Node.ATTRIBUTE_NODE,
Node.COMMENT_NODE };
- List nodes = XMLUtil.filter(nl, toFilter);
- List nodes2 = XMLUtil.filter(nl2, toFilter);
+ List<Node> nodes = XMLUtil.filter(nl, toFilter);
+ List<Node> nodes2 = XMLUtil.filter(nl2, toFilter);
int length = nodes.size();
@@ -343,8 +343,8 @@
for (int i = 0; i < length; i++)
{
- Node n = (Node)nodes.get(i);
- Node n2 = (Node)nodes2.get(i);
+ Node n = nodes.get(i);
+ Node n2 = nodes2.get(i);
XMLUtil.assertEquivalent(n, n2);
}
}
@@ -509,9 +509,9 @@
// Private
--------------------------------------------------------------------------------------
- private static List filter(final NodeList nl, final short[] typesToFilter)
+ private static List<Node> filter(final NodeList nl, final short[]
typesToFilter)
{
- List nodes = new ArrayList();
+ List<Node> nodes = new ArrayList<Node>();
outer: for (int i = 0; i < nl.getLength(); i++)
{
Modified:
branches/HORNETQ-720_Replication/tests/timing-tests/src/test/java/org/hornetq/tests/timing/core/journal/impl/NIOJournalImplTest.java
===================================================================
---
branches/HORNETQ-720_Replication/tests/timing-tests/src/test/java/org/hornetq/tests/timing/core/journal/impl/NIOJournalImplTest.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/tests/timing-tests/src/test/java/org/hornetq/tests/timing/core/journal/impl/NIOJournalImplTest.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -20,9 +20,9 @@
import org.hornetq.core.logging.Logger;
/**
- *
+ *
* A RealJournalImplTest
- *
+ *
* @author <a href="mailto:tim.fox@jboss.com">Tim Fox</a>
* @author <a href="mailto:clebert.suconic@jboss.com">Clebert
Suconic</a>
*
@@ -31,7 +31,7 @@
{
private static final Logger log = Logger.getLogger(NIOJournalImplTest.class);
- protected String journalDir = System.getProperty("user.home") +
"/journal-test";
+ protected String journalDir = System.getProperty("java.io.tmpdir",
"/tmp") + "/journal-test";
@Override
protected SequentialFileFactory getFileFactory() throws Exception
Modified:
branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/client/impl/LargeMessageBufferTest.java
===================================================================
---
branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/client/impl/LargeMessageBufferTest.java 2011-10-05
16:43:19 UTC (rev 11474)
+++
branches/HORNETQ-720_Replication/tests/unit-tests/src/test/java/org/hornetq/tests/unit/core/client/impl/LargeMessageBufferTest.java 2011-10-05
16:46:27 UTC (rev 11475)
@@ -36,7 +36,6 @@
import org.hornetq.api.core.client.MessageHandler;
import org.hornetq.core.client.impl.ClientConsumerInternal;
import org.hornetq.core.client.impl.ClientMessageInternal;
-import org.hornetq.core.client.impl.ClientSessionInternal;
import org.hornetq.core.client.impl.LargeMessageControllerImpl;
import org.hornetq.core.protocol.core.impl.wireformat.SessionQueueQueryResponseMessage;
import org.hornetq.core.protocol.core.impl.wireformat.SessionReceiveContinuationMessage;
@@ -49,8 +48,6 @@
* A LargeMessageBufferUnitTest
*
* @author <a href="mailto:clebert.suconic@jboss.org">Clebert
Suconic</a>
- *
- *
*/
public class LargeMessageBufferTest extends UnitTestCase
{
@@ -67,6 +64,7 @@
// Public --------------------------------------------------------
+ @Override
protected void setUp() throws Exception
{
super.setUp();
@@ -77,6 +75,7 @@
tmp.mkdirs();
}
+ @Override
protected void tearDown() throws Exception
{
super.tearDown();
@@ -839,12 +838,6 @@
}
- public void stop() throws HornetQException
- {
- // TODO Auto-generated method stub
-
- }
-
public void stop(boolean waitForOnMessage) throws HornetQException
{
// To change body of implemented methods use File | Settings | File Templates.
@@ -855,16 +848,5 @@
// TODO Auto-generated method stub
return null;
}
-
- /* (non-Javadoc)
- * @see org.hornetq.core.client.impl.ClientConsumerInternal#getSession()
- */
- public ClientSessionInternal getSession()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
}
-
}