Revision 564bd9c9 src/main/scala/gr/grnet/aquarium/store/mongodb/MongoDBStore.scala
b/src/main/scala/gr/grnet/aquarium/store/mongodb/MongoDBStore.scala | ||
---|---|---|
184 | 184 |
} |
185 | 185 |
|
186 | 186 |
private[this] def _sortByTimestampAsc[A <: AquariumEvent](one: A, two: A): Boolean = { |
187 |
if (one.timestamp > two.timestamp) false
|
|
188 |
else if (one.timestamp < two.timestamp) true
|
|
187 |
if (one.occurredMillis > two.occurredMillis) false
|
|
188 |
else if (one.occurredMillis < two.occurredMillis) true
|
|
189 | 189 |
else true |
190 | 190 |
} |
191 | 191 |
|
192 | 192 |
private[this] def _sortByTimestampDesc[A <: AquariumEvent](one: A, two: A): Boolean = { |
193 |
if (one.timestamp < two.timestamp) false
|
|
194 |
else if (one.timestamp > two.timestamp) true
|
|
193 |
if (one.occurredMillis < two.occurredMillis) false
|
|
194 |
else if (one.occurredMillis > two.occurredMillis) true
|
|
195 | 195 |
else true |
196 | 196 |
} |
197 | 197 |
|
Also available in: Unified diff