Skip to content

Commit

Permalink
Drop compareTo operation
Browse files Browse the repository at this point in the history
Drop the compareTo operation since the use of a Deque resolves the
ordering of entries

#2021
  • Loading branch information
smcvb committed Feb 3, 2022
1 parent 4e14870 commit 2acfa61
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 137 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,5 @@ public interface DeadLetterEntry<T extends Message<?>> {
*/
void evict();

/**
* Compares two {@link DeadLetterEntry dead-letters} with one another, based on when they {@link #expiresAt()}.
*
* @param first The first {@link DeadLetterEntry dead-letter} to compare with.
* @param second The second {@link DeadLetterEntry dead-letter} to compare with.
* @return The result of {@link Instant#compareTo(Instant)} between the {@code first} and {@code second} {@link
* DeadLetterEntry dead-letter}.
*/
static int compare(DeadLetterEntry<?> first, DeadLetterEntry<?> second) {
return first.expiresAt().compareTo(second.expiresAt());
}

}

This file was deleted.

0 comments on commit 2acfa61

Please sign in to comment.