You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2015/09/14 13:59:55 UTC

[1/3] ignite git commit: # master - fixed javadoc for TopologyValidator.

Repository: ignite
Updated Branches:
  refs/heads/ignite-1282 dfcee8d3a -> b1a3cbe30


# master - fixed javadoc for TopologyValidator.


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

Branch: refs/heads/ignite-1282
Commit: 7bd81c29e3da671084c8a425fe0880b85a0644a1
Parents: 40ae364
Author: Dmitiry Setrakyan <ds...@gridgain.com>
Authored: Thu Sep 10 16:34:47 2015 -0700
Committer: Dmitiry Setrakyan <ds...@gridgain.com>
Committed: Thu Sep 10 16:34:47 2015 -0700

----------------------------------------------------------------------
 .../ignite/configuration/TopologyValidator.java | 42 ++++++++++++--------
 1 file changed, 25 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/7bd81c29/modules/core/src/main/java/org/apache/ignite/configuration/TopologyValidator.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/TopologyValidator.java b/modules/core/src/main/java/org/apache/ignite/configuration/TopologyValidator.java
index 874fc69..8981a57 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/TopologyValidator.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/TopologyValidator.java
@@ -17,34 +17,42 @@
 
 package org.apache.ignite.configuration;
 
-import java.io.Serializable;
-import java.util.Collection;
-import javax.cache.CacheException;
-import org.apache.ignite.IgniteException;
-import org.apache.ignite.cluster.ClusterNode;
+import org.apache.ignite.*;
+import org.apache.ignite.cluster.*;
+
+import javax.cache.*;
+import java.io.*;
+import java.util.*;
 
 /**
- * Topology validator checks whether the new topology is valid for specific cache at each topology change.
- * <p>
- * Topology is always valid in case no topology validator used.
+ * Topology validator is used to verify that cluster topology is valid for further cache operations.
+ * The topology validator is invoked every time the cluster topology changes (either a new node joined
+ * or an existing node failed or left).
  * <p>
- * In case topology is valid for specific cache all operations on this cache are allowed.
+ * If topology validator is not configured, then the cluster topology is always considered to be valid.
  * <p>
- * In case topology is not valid for specific cache all update operations on this cache are restricted:
+ * Whenever the {@link #validate(Collection)} method returns {@code true}, then the topology is considered valid
+ * for a certain cache and all operations on this cache will be allowed to proceed. Otherwise, all update operations
+ * on the cache are restricted with the following exceptions:
  * <ul>
- * <li>{@link CacheException} will be thrown at update operations (put, remove, etc) attempt.</li>
- * <li>{@link IgniteException} will be thrown at transaction commit attempt.</li>
+ * <li>{@link CacheException} will be thrown for all update operations (put, remove, etc) attempt.</li>
+ * <li>{@link IgniteException} will be thrown for the transaction commit attempt.</li>
  * </ul>
- * Usage example
- * <p>
- * Following validator allows to put data only in case topology contains exactly 2 nodes:
- * <pre>{@code
+ * After returning {@code false} and declaring the topology not valid, the topology validator can return
+ * to normal state whenever the next topology change happens.
+ * <h1 class="header">Example</h1>
+ * The example below shows how a validator can be used to allow cache updates only in case if the cluster
+ * topology contains exactly 2 nodes:
+ * <pre name="code" class="java">
  * new TopologyValidator() {
  *    public boolean validate(Collection<ClusterNode> nodes) {
  *       return nodes.size() == 2;
  *    }
  * }
- * }</pre>
+ * </pre>
+ * <h1 class="header">Configuration</h1>
+ * The topology validator can be configured either from code or XML via
+ * {@link CacheConfiguration#setTopologyValidator(TopologyValidator)} method.
  */
 public interface TopologyValidator extends Serializable {
     /**


[2/3] ignite git commit: # master - fixed javadoc for TopologyValidator.

Posted by vo...@apache.org.
# master - fixed javadoc for TopologyValidator.


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

Branch: refs/heads/ignite-1282
Commit: b736c46f669f07ea9b23a4469bc3ff562920ea08
Parents: 7bd81c2
Author: Dmitiry Setrakyan <ds...@gridgain.com>
Authored: Thu Sep 10 16:37:05 2015 -0700
Committer: Dmitiry Setrakyan <ds...@gridgain.com>
Committed: Thu Sep 10 16:37:05 2015 -0700

----------------------------------------------------------------------
 .../apache/ignite/configuration/TopologyValidator.java    | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b736c46f/modules/core/src/main/java/org/apache/ignite/configuration/TopologyValidator.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/TopologyValidator.java b/modules/core/src/main/java/org/apache/ignite/configuration/TopologyValidator.java
index 8981a57..abd69be 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/TopologyValidator.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/TopologyValidator.java
@@ -17,12 +17,12 @@
 
 package org.apache.ignite.configuration;
 
-import org.apache.ignite.*;
-import org.apache.ignite.cluster.*;
+import org.apache.ignite.IgniteException;
+import org.apache.ignite.cluster.ClusterNode;
 
-import javax.cache.*;
-import java.io.*;
-import java.util.*;
+import javax.cache.CacheException;
+import java.io.Serializable;
+import java.util.Collection;
 
 /**
  * Topology validator is used to verify that cluster topology is valid for further cache operations.


[3/3] ignite git commit: Merge branch 'master' into ignite-1282

Posted by vo...@apache.org.
Merge branch 'master' into ignite-1282


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

Branch: refs/heads/ignite-1282
Commit: b1a3cbe307057286f2d156d2f65aab0bf6c699cd
Parents: dfcee8d b736c46
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Sep 14 15:00:23 2015 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Sep 14 15:00:23 2015 +0300

----------------------------------------------------------------------
 .../ignite/configuration/TopologyValidator.java | 38 ++++++++++++--------
 1 file changed, 23 insertions(+), 15 deletions(-)
----------------------------------------------------------------------