xmlBlaster 2.1.0 API

org.xmlBlaster.util.queue.ram
Class MsgComparator

java.lang.Object
  extended by org.xmlBlaster.util.queue.ram.MsgComparator
All Implemented Interfaces:
java.util.Comparator

final class MsgComparator
extends java.lang.Object
implements java.util.Comparator

Sorts the messages

  1. Priority
  2. Timestamp

See Also:
MsgQueueEntry.compare(I_QueueEntry)

Constructor Summary
MsgComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Comparing the longs directly is 20% faster than having a String compound key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

MsgComparator

MsgComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Comparing the longs directly is 20% faster than having a String compound key

Specified by:
compare in interface java.util.Comparator

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.