FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.communication.mailer.CentralMailer.TimestampComparator Class Reference

A comparator used in the PriorityQueue to order messages according to their timestamps. More...

Inheritance diagram for frodo2.communication.mailer.CentralMailer.TimestampComparator:

Public Member Functions

int compare (MessageWrapper m1, MessageWrapper m2)
 Compares the timestamp of two messages.

Detailed Description

A comparator used in the PriorityQueue to order messages according to their timestamps.

Author
Thomas Leaute

Member Function Documentation

◆ compare()

int frodo2.communication.mailer.CentralMailer.TimestampComparator.compare ( MessageWrapper m1,
MessageWrapper m2 )

Compares the timestamp of two messages.

Parameters
m1the first message
m2the second message
Returns
the difference between the timestamp of m1 and m2. If the difference is 0, it returns the difference between the messageCounters of m1 and m2
See also
Comparator#compare(Object, Object)

References frodo2.communication.MessageWrapper.getMessageCounter(), and frodo2.communication.MessageWrapper.getTime().

Here is the call graph for this function:

The documentation for this class was generated from the following file: