ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [1/2] ignite git commit: IGNITE-1288: WIP on processor.
Date Tue, 25 Aug 2015 07:13:02 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1288 [created] 440b87470


IGNITE-1288: WIP on processor.


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

Branch: refs/heads/ignite-1288
Commit: 2afcd831ea1a3a383c44d35e5cde9bd0d5524403
Parents: 4df0716
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Mon Aug 24 17:00:35 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Mon Aug 24 17:00:35 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/IgniteKernal.java    |  8 ++++++-
 .../platform/PlatformNoopProcessor.java         | 24 ++++++++++++++++++++
 .../processors/platform/PlatformProcessor.java  | 23 +++++++++++++++++++
 3 files changed, 54 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/2afcd831/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index bf47f63..f03d9fc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -48,6 +48,7 @@ import org.apache.ignite.internal.processors.job.*;
 import org.apache.ignite.internal.processors.jobmetrics.*;
 import org.apache.ignite.internal.processors.nodevalidation.*;
 import org.apache.ignite.internal.processors.offheap.*;
+import org.apache.ignite.internal.processors.platform.*;
 import org.apache.ignite.internal.processors.plugin.*;
 import org.apache.ignite.internal.processors.port.*;
 import org.apache.ignite.internal.processors.query.*;
@@ -439,7 +440,8 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
         assert cfg != null;
 
         return F.transform(cfg.getUserAttributes().entrySet(), new C1<Map.Entry<String,
?>, String>() {
-            @Override public String apply(Map.Entry<String, ?> e) {
+            @Override
+            public String apply(Map.Entry<String, ?> e) {
                 return e.getKey() + ", " + e.getValue().toString();
             }
         });
@@ -789,6 +791,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
                 IgniteComponentType.HADOOP.createIfInClassPath(ctx, cfg.getHadoopConfiguration()
!= null)));
             startProcessor(new GridServiceProcessor(ctx));
             startProcessor(new DataStructuresProcessor(ctx));
+            startProcessor(createComponent(PlatformProcessor.class, ctx));
 
             // Start plugins.
             for (PluginProvider provider : ctx.plugins().allProviders()) {
@@ -2965,6 +2968,9 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
         if (cls.equals(DiscoveryNodeValidationProcessor.class))
             return (T)new OsDiscoveryNodeValidationProcessor(ctx);
 
+        if (cls.equals(PlatformProcessor.class))
+            return (T)new PlatformNoopProcessor(ctx);
+
         Class<T> implCls = null;
 
         try {

http://git-wip-us.apache.org/repos/asf/ignite/blob/2afcd831/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformNoopProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformNoopProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformNoopProcessor.java
new file mode 100644
index 0000000..9e79a6c
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformNoopProcessor.java
@@ -0,0 +1,24 @@
+package org.apache.ignite.internal.processors.platform;
+
+import org.apache.ignite.*;
+import org.apache.ignite.internal.*;
+import org.apache.ignite.internal.processors.*;
+
+/**
+ * No-op processor.
+ */
+public class PlatformNoopProcessor extends GridProcessorAdapter implements PlatformProcessor
{
+    public PlatformNoopProcessor(GridKernalContext ctx) {
+        super(ctx);
+    }
+
+    /** {@inheritDoc} */
+    @Override public Ignite ignite() {
+        return null;
+    }
+
+    /** {@inheritDoc} */
+    @Override public long environmentPointer() {
+        return 0;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/2afcd831/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessor.java
new file mode 100644
index 0000000..a799431
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/PlatformProcessor.java
@@ -0,0 +1,23 @@
+package org.apache.ignite.internal.processors.platform;
+
+import org.apache.ignite.*;
+import org.apache.ignite.internal.processors.*;
+
+/**
+ * Platform processor.
+ */
+public interface PlatformProcessor extends GridProcessor {
+    /**
+     * Get owning Ignite instance.
+     *
+     * @return Ignite instance.
+     */
+    public Ignite ignite();
+
+    /**
+     * Get environment pointer associated with this processor.
+     *
+     * @return Environment pointer.
+     */
+    public long environmentPointer();
+}


Mime
View raw message