User: hiram   
  Date: 01/01/15 19:57:31

  Modified:    src/java/org/spydermq SpyMessage.java
  Log:
  Backed off the last set of chages meant to improve performance since they were
  causing worse performance.
  
  Revision  Changes    Path
  1.14      +19 -3     spyderMQ/src/java/org/spydermq/SpyMessage.java
  
  Index: SpyMessage.java
  ===================================================================
  RCS file: /products/cvs/ejboss/spyderMQ/src/java/org/spydermq/SpyMessage.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- SpyMessage.java   2001/01/10 13:57:47     1.13
  +++ SpyMessage.java   2001/01/16 03:57:31     1.14
  @@ -22,10 +22,10 @@
    *   @author Norbert Lataille ([EMAIL PROTECTED])
    *   @author Hiram Chirino ([EMAIL PROTECTED])
    * 
  - *   @version $Revision: 1.13 $
  + *   @version $Revision: 1.14 $
    */
   public class SpyMessage 
  -     implements Serializable, Cloneable, Message
  +     implements Serializable, Cloneable, Message, Comparable
   {
   
        // Constants -----------------------------------------------------
  @@ -182,7 +182,7 @@
                jmsExpiration=expiration;
        }
        
  -     public int getJMSPriority()
  +     public int getJMSPriority() throws JMSException
        {
                return jmsPriority;
        }
  @@ -432,7 +432,23 @@
        }
        
                
  -         
  +     /**
  +      * Return a negative number if this message should be sent
  +      * before the o message. Return a positive if should be sent
  +      * after the o message.
  +      */
  +     public int compareTo(Object o) {
  +             
  +             SpyMessage sm = (SpyMessage)o;
  +             
  +             if( jmsPriority > sm.jmsPriority) {
  +                     return -1;
  +             }
  +             if( jmsPriority < sm.jmsPriority ) {
  +                     return 1;
  +             }
  +             return (int)(messageId - sm.messageId);         
  +     }         
   
        
        public void doAcknowledge() throws JMSException
  
  
  

Reply via email to