nizhikov commented on a change in pull request #6837: IGNITE-10223: affinity
list methods are added, tests are changed
URL: https://github.com/apache/ignite/pull/6837#discussion_r322132155
##########
File path:
modules/core/src/main/java/org/apache/ignite/cache/affinity/Affinity.java
##########
@@ -188,8 +192,20 @@
* always first.
* @throws IgniteException If there are no alive nodes for this cache.
*/
+ @Deprecated
public Collection<ClusterNode> mapKeyToPrimaryAndBackups(K key);
+ /**
+ * Gets primary and backup nodes for the key. Primary node is always
+ * first in the returned list.
+ *
+ * @param key Key to get affinity nodes for.
+ * @return List of primary and backup nodes for the key with primary node
+ * always first.
+ * @throws IgniteException If there are no alive nodes for this cache.
+ */
+ public List<ClusterNode> mapKeyToPrimaryAndBackupsList(K key);
Review comment:
Classes located in `org/apache/ignite/internal` package are Internal API.
`org/apache/ignite/cache/affinity/Affinity.java` package are Public API.
So, we should keep Public API backwards compatible between minor releases.
It means, we can't add new methods to the public API without default
implementation, because, there are implementations of this interface out of
Ignite codebase.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services