belliottsmith commented on code in PR #6:
URL: https://github.com/apache/cassandra-accord/pull/6#discussion_r937089643
##########
accord-core/src/main/java/accord/api/Key.java:
##########
@@ -3,10 +3,7 @@
/**
* A routing key for determining which shards are involved in a transaction
*/
-public interface Key<K extends Key<K>> extends Comparable<K>
+public interface Key<K extends Key<K>> extends RoutingKey<K>
{
- /**
- * Returns a hash code of a key to support accord internal sharding. Hash
values for equal keys must be equal.
- */
- int keyHash();
+ Key toRoutingKey();
Review Comment:
In the next patch set I remove the generic parameter, as it just pollutes
the codebase to no benefit, as we never specify it. It simplifies only one
method at the expense of lots of other code.
`toRoutingKey` appears to be dead in this patch set yes, I'll remove it.
`RoutingKey` overall is used in the later patch set in part to minimise the
data that is sent, and in part to better formalise the relationship keys and
their use cases (for routing, we only need a token, not a full DecoratedKey in
C* terms)
--
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]