ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [14/50] [abbrv] incubator-ignite git commit: #ignite-311: move askPluginsInfo to IgnitePluginProcessor.
Date Sat, 28 Feb 2015 06:28:58 GMT
#ignite-311: move askPluginsInfo to IgnitePluginProcessor.


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

Branch: refs/heads/ignite-51
Commit: 509d2d8aae37ac2da4030f84717ad4c993abbc0d
Parents: d6d95f8
Author: ivasilinets <ivasilinets@gridgain.com>
Authored: Thu Feb 26 11:54:45 2015 +0300
Committer: ivasilinets <ivasilinets@gridgain.com>
Committed: Thu Feb 26 11:54:45 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/internal/IgniteKernal.java    | 34 ------------------
 .../plugin/IgnitePluginProcessor.java           | 37 ++++++++++++++++++++
 2 files changed, 37 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/509d2d8a/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 97567c5..77df6f4 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
@@ -105,9 +105,6 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
     /** Ignite site that is shown in log messages. */
     static final String SITE = "www.gridgain.com";
 
-    /** Plugin information. */
-    public static final String PLUGIN_INFO = "Configured plugins: ";
-
     /** System line separator. */
     private static final String NL = U.nl();
 
@@ -714,8 +711,6 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
 
             startProcessor(ctx, new IgnitePluginProcessor(ctx, cfg), attrs);
 
-            ackPluginsInfo();
-
             // Off-heap processor has no dependencies.
             startProcessor(ctx, new GridOffHeapProcessor(ctx), attrs);
 
@@ -1575,35 +1570,6 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable
{
     }
 
     /**
-     * Plugin information.
-     */
-    private String pluginInfo() {
-        Collection<PluginProvider> plugins = ctx.plugins().allProviders();
-
-        if (plugins.size() == 0)
-            return NL + ">>>    " + PLUGIN_INFO + "none";
-
-        String info = NL + ">>>    " + PLUGIN_INFO + NL;
-
-        for (PluginProvider plugin : plugins)
-            info += ">>>    " + plugin.name() + " " + plugin.version() + NL +
-                ">>>    " + plugin.copyright();
-
-        return info;
-    }
-
-    /**
-     * Print plugin information.
-     */
-    private void ackPluginsInfo() {
-        if (log.isQuiet())
-            U.quiet(false, pluginInfo().split(NL + ">>> "));
-
-        if (log.isInfoEnabled())
-            log.info(pluginInfo());
-    }
-
-    /**
      * Prints start info.
      *
      * @param rtBean Java runtime bean.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/509d2d8a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
index 6502b5c..aca8fb8 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/plugin/IgnitePluginProcessor.java
@@ -42,6 +42,9 @@ public class IgnitePluginProcessor extends GridProcessorAdapter {
     /** */
     private volatile Map<Class<?>, Object[]> extensions;
 
+    /** Plugin information. */
+    public static final String PLUGIN_INFO = "Configured plugins: ";
+
     /**
      *
      * @param ctx Kernal context.
@@ -159,6 +162,11 @@ public class IgnitePluginProcessor extends GridProcessorAdapter {
     }
 
     /** {@inheritDoc} */
+    @Override public void start() throws IgniteCheckedException {
+        ackPluginsInfo();
+    }
+
+    /** {@inheritDoc} */
     @Nullable @Override public DiscoveryDataExchangeType discoveryDataType() {
         return DiscoveryDataExchangeType.PLUGIN;
     }
@@ -198,6 +206,35 @@ public class IgnitePluginProcessor extends GridProcessorAdapter {
     }
 
     /**
+     * Plugin information.
+     */
+    private String pluginInfo() {
+        Collection<PluginProvider> plugins = ctx.plugins().allProviders();
+
+        if (plugins.size() == 0)
+            return U.nl() + ">>>    " + PLUGIN_INFO + "none";
+
+        String info = U.nl() + ">>>    " + PLUGIN_INFO + U.nl();
+
+        for (PluginProvider plugin : plugins)
+            info += ">>>    " + plugin.name() + " " + plugin.version() + U.nl()
+
+                ">>>    " + plugin.copyright();
+
+        return info;
+    }
+
+    /**
+     * Print plugin information.
+     */
+    private void ackPluginsInfo() {
+        if (log.isQuiet())
+            U.quiet(false, pluginInfo().split(U.nl() + ">>> "));
+
+        if (log.isInfoEnabled())
+            log.info(pluginInfo());
+    }
+
+    /**
      *
      */
     private static class ExtensionRegistryImpl implements ExtensionRegistry {


Mime
View raw message