ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [13/50] [abbrv] ignite git commit: IGNITE-7520 Provide util-methods to get baseline from context - Fixes #3431.
Date Fri, 09 Feb 2018 13:02:28 GMT
IGNITE-7520 Provide util-methods to get baseline from context - Fixes #3431.

Signed-off-by: Alexey Goncharuk <alexey.goncharuk@gmail.com>


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

Branch: refs/heads/ignite-7485-2
Commit: f92d20ebc4683be945aa0a89c1908119f519bdc1
Parents: f8d1674
Author: EdShangGG <eshangareev@gridgain.com>
Authored: Thu Feb 1 16:34:05 2018 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Thu Feb 1 16:34:05 2018 +0300

----------------------------------------------------------------------
 .../ignite/internal/util/IgniteUtils.java       | 28 ++++++++++++++++++++
 1 file changed, 28 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f92d20eb/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 548fb1b..1d80a9e 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -10325,6 +10325,34 @@ public abstract class IgniteUtils {
     }
 
     /**
+     * @param ctx Context.
+     *
+     * @return instance of current baseline topology if it exists
+     */
+    public static BaselineTopology getBaselineTopology(@NotNull GridKernalContext ctx) {
+        return ctx.state().clusterState().baselineTopology();
+    }
+
+
+    /**
+     * @param cctx Context.
+     *
+     * @return instance of current baseline topology if it exists
+     */
+    public static BaselineTopology getBaselineTopology(@NotNull GridCacheSharedContext cctx)
{
+        return getBaselineTopology(cctx.kernalContext());
+    }
+
+    /**
+     * @param cctx Context.
+     *
+     * @return instance of current baseline topology if it exists
+     */
+    public static BaselineTopology getBaselineTopology(@NotNull GridCacheContext cctx) {
+        return getBaselineTopology(cctx.kernalContext());
+    }
+
+    /**
      * @param addr pointer in memory
      * @param len how much byte to read (should divide 8)
      *


Mime
View raw message