dcapwell commented on code in PR #65:
URL: https://github.com/apache/cassandra-accord/pull/65#discussion_r1443264669
##########
accord-core/src/main/java/accord/primitives/AbstractRanges.java:
##########
@@ -56,7 +56,10 @@ public int indexOf(RoutableKey key)
@Override
public int indexOf(Range find)
Review Comment:
I am not a fan of this as this method is coming from
`accord.primitives.Routables#indexOf` and that doesn't really make sense to me
with the other 2 implementations (finding a key in a set of keys).
One possibility is to add a *new* method on `AbstractRanges` that lets you
define the `Search` param and have `indexOf` return the *first* match. The
only code path I see that might use this new API is
`accord.primitives.AbstractRanges#intersects(accord.primitives.Range)` as it
could possible do less checks as it can return after the first match
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]