ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject ignite git commit: IGNITE-4157 - Added mapping update listener stub
Date Thu, 19 Jan 2017 15:07:51 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-2.0 d0a6c57aa -> 34a978339


IGNITE-4157 - Added mapping update listener stub


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

Branch: refs/heads/ignite-2.0
Commit: 34a97833905a33bdb31b8e4580a576c2142313a7
Parents: d0a6c57
Author: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Authored: Thu Jan 19 18:04:23 2017 +0300
Committer: Alexey Goncharuk <alexey.goncharuk@gmail.com>
Committed: Thu Jan 19 18:06:12 2017 +0300

----------------------------------------------------------------------
 .../ignite/internal/GridKernalContext.java      |  8 +++++++
 .../ignite/internal/GridKernalContextImpl.java  | 12 ++++++++++-
 .../ignite/internal/MarshallerContextImpl.java  |  2 +-
 .../GridMarshallerMappingProcessor.java         | 22 ++++++++++++++++++++
 4 files changed, 42 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/34a97833/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java
b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java
index b083c84..177062d 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContext.java
@@ -49,6 +49,7 @@ import org.apache.ignite.internal.processors.igfs.IgfsHelper;
 import org.apache.ignite.internal.processors.igfs.IgfsProcessorAdapter;
 import org.apache.ignite.internal.processors.job.GridJobProcessor;
 import org.apache.ignite.internal.processors.jobmetrics.GridJobMetricsProcessor;
+import org.apache.ignite.internal.processors.marshaller.GridMarshallerMappingProcessor;
 import org.apache.ignite.internal.processors.odbc.OdbcProcessor;
 import org.apache.ignite.internal.processors.offheap.GridOffHeapProcessor;
 import org.apache.ignite.internal.processors.platform.PlatformProcessor;
@@ -296,6 +297,13 @@ public interface GridKernalContext extends Iterable<GridComponent>
{
     public PoolProcessor pools();
 
     /**
+     * Gets grid marshaller mapping processor.
+     *
+     * @return Mapping processor.
+     */
+    public GridMarshallerMappingProcessor mapping();
+
+    /**
      * Gets Hadoop helper.
      *
      * @return Hadoop helper.

http://git-wip-us.apache.org/repos/asf/ignite/blob/34a97833/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
index 569460e..a45be59 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/GridKernalContextImpl.java
@@ -267,6 +267,10 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable
 
     /** */
     @GridToStringExclude
+    private GridMarshallerMappingProcessor mappingProc;
+
+    /** */
+    @GridToStringExclude
     private IgnitePluginProcessor pluginProc;
 
     /** */
@@ -564,8 +568,9 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable
             platformProc = (PlatformProcessor)comp;
         else if (comp instanceof PoolProcessor)
             poolProc = (PoolProcessor) comp;
+        else if (comp instanceof GridMarshallerMappingProcessor)
+            mappingProc = (GridMarshallerMappingProcessor)comp;
         else if (!(comp instanceof DiscoveryNodeValidationProcessor
-                || comp instanceof GridMarshallerMappingProcessor
                 || comp instanceof PlatformPluginProcessor))
             assert (comp instanceof GridPluginComponent) : "Unknown manager class: " + comp.getClass();
 
@@ -795,6 +800,11 @@ public class GridKernalContextImpl implements GridKernalContext, Externalizable
     }
 
     /** {@inheritDoc} */
+    @Override public GridMarshallerMappingProcessor mapping() {
+        return mappingProc;
+    }
+
+    /** {@inheritDoc} */
     @Override public ExecutorService utilityCachePool() {
         return utilityCachePool;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/34a97833/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
index 751a7d5..b137e99 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/MarshallerContextImpl.java
@@ -176,7 +176,7 @@ public class MarshallerContextImpl implements MarshallerContext {
      * @param ldr Class loader used to get properties file.
      * @param fileName File name.
      */
-    private void checkHasClassName(String clsName, ClassLoader ldr, String fileName) {
+    public void checkHasClassName(String clsName, ClassLoader ldr, String fileName) {
         ConcurrentMap cache = getCacheFor(JAVA_ID);
 
         if (!cache.containsKey(clsName.hashCode()))

http://git-wip-us.apache.org/repos/asf/ignite/blob/34a97833/modules/core/src/main/java/org/apache/ignite/internal/processors/marshaller/GridMarshallerMappingProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/marshaller/GridMarshallerMappingProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/marshaller/GridMarshallerMappingProcessor.java
index 7356e6c..f5193ab 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/marshaller/GridMarshallerMappingProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/marshaller/GridMarshallerMappingProcessor.java
@@ -17,6 +17,8 @@
 
 package org.apache.ignite.internal.processors.marshaller;
 
+import java.util.Collections;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
@@ -38,6 +40,8 @@ import org.apache.ignite.internal.processors.GridProcessorAdapter;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.util.future.GridFutureAdapter;
 import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.lang.IgniteBiInClosure;
+import org.apache.ignite.lang.IgniteBiTuple;
 import org.apache.ignite.lang.IgniteFuture;
 import org.apache.ignite.spi.discovery.DiscoveryDataBag;
 import org.apache.ignite.spi.discovery.DiscoveryDataBag.GridDiscoveryData;
@@ -123,6 +127,24 @@ public class GridMarshallerMappingProcessor extends GridProcessorAdapter
{
     }
 
     /**
+     * Adds a listener to be notified when mapping changes.
+     *
+     * @param mappingUpdatedListener Mapping updated listener.
+     */
+    public void addMappingUpdatedListener(IgniteBiInClosure<Integer, String> mappingUpdatedListener)
{
+
+    }
+
+    /**
+     * Gets an iterator over all current mappings.
+     *
+     * @return Iterator over current mappings.
+     */
+    public Iterator<IgniteBiTuple<Integer, String>> currentMappings() {
+        return Collections.emptyListIterator();
+    }
+
+    /**
      *
      */
     private final class MissingMappingRequestListener implements GridMessageListener {


Mime
View raw message