// Default comparator public int CompareTo(Message other) { //If two sequence numbers are the same if (SequenceNumber == other.SequenceNumber) { // Undeliverble message is smaller if (Deliverable && !other.Deliverable) { return(1); } // Smaller process id return(ProcessID.CompareTo(other.ProcessID)); } // Msg with smaller sequence number is smaller return(SequenceNumber.CompareTo(other.SequenceNumber)); }
public int CompareTo(JitCapProcess other) { return(ProcessID.CompareTo(other.ProcessID)); }