IGNITE-5597 - Fix javadoc in Affinity and AffinityFunction for REPLICATED 
cache. This closes #2268.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/7338445a
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/7338445a
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/7338445a

Branch: refs/heads/ignite-5578
Commit: 7338445ac9c1a2343fd41cdd20785de07b727796
Parents: 00c6b6c
Author: dkarachentsev <dkarachent...@gridgain.com>
Authored: Thu Jul 13 16:00:08 2017 +0300
Committer: dkarachentsev <dkarachent...@gridgain.com>
Committed: Thu Jul 13 16:00:08 2017 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/cache/affinity/Affinity.java  | 16 ++++------------
 .../rendezvous/RendezvousAffinityFunction.java      |  4 ++--
 2 files changed, 6 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7338445a/modules/core/src/main/java/org/apache/ignite/cache/affinity/Affinity.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/affinity/Affinity.java 
b/modules/core/src/main/java/org/apache/ignite/cache/affinity/Affinity.java
index a5756e9..477f991 100644
--- a/modules/core/src/main/java/org/apache/ignite/cache/affinity/Affinity.java
+++ b/modules/core/src/main/java/org/apache/ignite/cache/affinity/Affinity.java
@@ -25,8 +25,8 @@ import org.jetbrains.annotations.Nullable;
 
 /**
  * Provides affinity information to detect which node is primary and which 
nodes are
- * backups for a partitioned cache. You can get an instance of this interface 
by calling
- * {@code Ignite.affinity(cacheName)} method.
+ * backups for a partitioned or replicated cache. You can get an instance of 
this
+ * interface by calling {@code Ignite.affinity(cacheName)} method.
  * <p>
  * Mapping of a key to a node is a three-step operation. First step will get 
an affinity key for given key
  * using {@link AffinityKeyMapper}. If mapper is not specified, the original 
key will be used. Second step
@@ -153,11 +153,7 @@ public interface Affinity<K> {
      * This method works as following:
      * <ul>
      * <li>For local caches it returns only local node mapped to all keys.</li>
-     * <li>
-     *      For fully replicated caches {@link AffinityFunction} is
-     *      used to determine which keys are mapped to which nodes.
-     * </li>
-     * <li>For partitioned caches, the returned map represents node-to-key 
affinity.</li>
+     * <li>For other caches, the returned map represents node-to-key 
affinity.</li>
      * </ul>
      *
      * @param keys Keys to map to nodes.
@@ -174,11 +170,7 @@ public interface Affinity<K> {
      * This method works as following:
      * <ul>
      * <li>For local caches it returns only local node ID.</li>
-     * <li>
-     *      For fully replicated caches first node ID returned by {@link 
AffinityFunction}
-     *      is returned.
-     * </li>
-     * <li>For partitioned caches, primary node for the given key is 
returned.</li>
+     * <li>For other caches, primary node for the given key is returned.</li>
      * </ul>
      *
      * @param key Keys to map to a node.

http://git-wip-us.apache.org/repos/asf/ignite/blob/7338445a/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
 
b/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
index 0fb20ee..0e9afb7 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/cache/affinity/rendezvous/RendezvousAffinityFunction.java
@@ -174,8 +174,8 @@ public class RendezvousAffinityFunction implements 
AffinityFunction, Serializabl
      * size should be relatively small. Try to avoid having partitions with 
more
      * than quarter million keys.
      * <p>
-     * Note that for fully replicated caches this method should always
-     * return {@code 1}.
+     * For fully replicated caches this method works the same way as a 
partitioned
+     * cache.
      *
      * @return Total partition count.
      */

Reply via email to