Github user ifesdjeen commented on a diff in the pull request:
https://github.com/apache/cassandra/pull/224#discussion_r197154559
--- Diff:
src/java/org/apache/cassandra/locator/AbstractReplicationStrategy.java ---
@@ -202,61 +204,65 @@ private Keyspace getKeyspace()
*
* @return the replication factor
*/
- public abstract int getReplicationFactor();
+ public abstract ReplicationFactor getReplicationFactor();
/*
* NOTE: this is pretty inefficient. also the inverse
(getRangeAddresses) below.
* this is fine as long as we don't use this on any critical path.
* (fixing this would probably require merging tokenmetadata into
replicationstrategy,
* so we could cache/invalidate cleanly.)
*/
- public Multimap<InetAddressAndPort, Range<Token>>
getAddressRanges(TokenMetadata metadata)
+ public ReplicaMultimap<InetAddressAndPort, ReplicaSet>
getAddressReplicas(TokenMetadata metadata)
--- End diff --
Because of how it's used, we can add another, non-map variant, since in the
majority of usages we're just calling `get` on just-materialised map.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]