[hornetq-commits] JBoss hornetq SVN: r8402 - in branches/20-optimisation: tests/src/org/hornetq/tests/unit/core/postoffice/impl and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Wed Nov 25 06:11:46 EST 2009


Author: timfox
Date: 2009-11-25 06:11:45 -0500 (Wed, 25 Nov 2009)
New Revision: 8402

Modified:
   branches/20-optimisation/src/main/org/hornetq/core/persistence/impl/journal/LargeServerMessageImpl.java
   branches/20-optimisation/tests/src/org/hornetq/tests/unit/core/postoffice/impl/BindingsImplTest.java
Log:
optimisation

Modified: branches/20-optimisation/src/main/org/hornetq/core/persistence/impl/journal/LargeServerMessageImpl.java
===================================================================
--- branches/20-optimisation/src/main/org/hornetq/core/persistence/impl/journal/LargeServerMessageImpl.java	2009-11-25 11:07:36 UTC (rev 8401)
+++ branches/20-optimisation/src/main/org/hornetq/core/persistence/impl/journal/LargeServerMessageImpl.java	2009-11-25 11:11:45 UTC (rev 8402)
@@ -74,7 +74,7 @@
     */
    private LargeServerMessageImpl(final LargeServerMessageImpl copy, final SequentialFile fileCopy, final long newID)
    {
-      super(copy);
+      super(copy, true);
       this.linkMessage = copy;
       storageManager = copy.storageManager;
       file = fileCopy;
@@ -273,7 +273,7 @@
    }
 
    @Override
-   public synchronized ServerMessage copy(final long newID) throws Exception
+   public synchronized ServerMessage copy(final long newID)
    {
       incrementDelayDeletionCount();
 

Modified: branches/20-optimisation/tests/src/org/hornetq/tests/unit/core/postoffice/impl/BindingsImplTest.java
===================================================================
--- branches/20-optimisation/tests/src/org/hornetq/tests/unit/core/postoffice/impl/BindingsImplTest.java	2009-11-25 11:07:36 UTC (rev 8401)
+++ branches/20-optimisation/tests/src/org/hornetq/tests/unit/core/postoffice/impl/BindingsImplTest.java	2009-11-25 11:11:45 UTC (rev 8402)
@@ -36,6 +36,7 @@
 import org.hornetq.core.server.RoutingContext;
 import org.hornetq.core.server.ServerMessage;
 import org.hornetq.core.server.impl.RoutingContextImpl;
+import org.hornetq.core.server.impl.ServerMessageImpl;
 import org.hornetq.core.transaction.Transaction;
 import org.hornetq.core.transaction.TransactionOperation;
 import org.hornetq.tests.util.UnitTestCase;
@@ -113,11 +114,11 @@
       {
          if (route)
          {
-            bind.route(new FakeMessage(), new RoutingContextImpl(new FakeTransaction()));
+            bind.route(new ServerMessageImpl(i, 100), new RoutingContextImpl(new FakeTransaction()));
          }
          else
          {
-            bind.redistribute(new FakeMessage(), queue, new RoutingContextImpl(new FakeTransaction()));
+            bind.redistribute(new ServerMessageImpl(i, 100), queue, new RoutingContextImpl(new FakeTransaction()));
          }
       }
    }
@@ -283,625 +284,7 @@
 
    }
 
-   class FakeMessage implements ServerMessage
-   {
-
-      public void decode(HornetQBuffer buffer)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void encode(HornetQBuffer buffer)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public ServerMessage copy() throws Exception
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public ServerMessage copy(long newID) throws Exception
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public MessageReference createReference(Queue queue)
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public int decrementDurableRefCount()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public int decrementRefCount(MessageReference reference) throws Exception
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public void encodeMessageIDToBuffer()
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public int getMemoryEstimate()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public PagingStore getPagingStore()
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public int getRefCount()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public int incrementDurableRefCount()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public int incrementRefCount(MessageReference reference) throws Exception
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public ServerMessage makeCopyForExpiryOrDLA(long newID, boolean expiry) throws Exception
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public boolean page(boolean duplicateDetection) throws Exception
-      {
-         // TODO Auto-generated method stub
-         return false;
-      }
-
-      public boolean page(long transactionID, boolean duplicateDetection) throws Exception
-      {
-         // TODO Auto-generated method stub
-         return false;
-      }
-
-      public void setMessageID(long id)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void setOriginalHeaders(ServerMessage other, boolean expiry)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void setPagingStore(PagingStore store)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public boolean storeIsPaging()
-      {
-         // TODO Auto-generated method stub
-         return false;
-      }
-
-      public void bodyChanged()
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void checkCopy()
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void clearCopied()
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public boolean containsProperty(SimpleString key)
-      {
-         // TODO Auto-generated method stub
-         return false;
-      }
-
-      public boolean containsProperty(String key)
-      {
-         // TODO Auto-generated method stub
-         return false;
-      }
-
-      public void decodeFromBuffer(HornetQBuffer buffer)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void decodeHeadersAndProperties(HornetQBuffer buffer)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void encodeHeadersAndProperties(HornetQBuffer buffer)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public HornetQBuffer encodeToBuffer()
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public HornetQBuffer getBodyBuffer()
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public BodyEncoder getBodyEncoder()
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public InputStream getBodyInputStream()
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public Boolean getBooleanProperty(SimpleString key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public Boolean getBooleanProperty(String key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public Byte getByteProperty(SimpleString key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public Byte getByteProperty(String key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public byte[] getBytesProperty(SimpleString key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public byte[] getBytesProperty(String key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public SimpleString getDestination()
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public Double getDoubleProperty(SimpleString key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public Double getDoubleProperty(String key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public int getEncodeSize()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public int getEndOfBodyPosition()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public int getEndOfMessagePosition()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public long getExpiration()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public Float getFloatProperty(SimpleString key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public Float getFloatProperty(String key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public int getHeadersAndPropertiesEncodeSize()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public Integer getIntProperty(SimpleString key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public Integer getIntProperty(String key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public long getLargeBodySize()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public Long getLongProperty(SimpleString key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public Long getLongProperty(String key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public long getMessageID()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public Object getObjectProperty(SimpleString key)
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public Object getObjectProperty(String key)
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public byte getPriority()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public TypedProperties getProperties()
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public Set<SimpleString> getPropertyNames()
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public Short getShortProperty(SimpleString key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public Short getShortProperty(String key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public SimpleString getSimpleStringProperty(SimpleString key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public SimpleString getSimpleStringProperty(String key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public String getStringProperty(SimpleString key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public String getStringProperty(String key) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public long getTimestamp()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public byte getType()
-      {
-         // TODO Auto-generated method stub
-         return 0;
-      }
-
-      public HornetQBuffer getWholeBuffer()
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public boolean isDurable()
-      {
-         // TODO Auto-generated method stub
-         return false;
-      }
-
-      public boolean isExpired()
-      {
-         // TODO Auto-generated method stub
-         return false;
-      }
-
-      public boolean isLargeMessage()
-      {
-         // TODO Auto-generated method stub
-         return false;
-      }
-
-      public void putBooleanProperty(SimpleString key, boolean value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putBooleanProperty(String key, boolean value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putByteProperty(SimpleString key, byte value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putByteProperty(String key, byte value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putBytesProperty(SimpleString key, byte[] value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putBytesProperty(String key, byte[] value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putDoubleProperty(SimpleString key, double value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putDoubleProperty(String key, double value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putFloatProperty(SimpleString key, float value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putFloatProperty(String key, float value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putIntProperty(SimpleString key, int value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putIntProperty(String key, int value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putLongProperty(SimpleString key, long value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putLongProperty(String key, long value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putObjectProperty(SimpleString key, Object value) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putObjectProperty(String key, Object value) throws PropertyConversionException
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putShortProperty(SimpleString key, short value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putShortProperty(String key, short value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putStringProperty(SimpleString key, SimpleString value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putStringProperty(String key, String value)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void putTypedProperties(TypedProperties properties)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public Object removeProperty(SimpleString key)
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public Object removeProperty(String key)
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public void setDestination(SimpleString destination)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void setDurable(boolean durable)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void setExpiration(long expiration)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void setPriority(byte priority)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void setTimestamp(long timestamp)
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public Map<String, Object> toMap()
-      {
-         // TODO Auto-generated method stub
-         return null;
-      }
-
-      public void resetCopied()
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-      public void setEndOfBodyPosition()
-      {
-         // TODO Auto-generated method stub
-         
-      }
-
-
-
-   }
-
+   
    class FakeFilter implements Filter
    {
 



More information about the hornetq-commits mailing list