Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D82D717593 for ; Tue, 5 May 2015 09:27:50 +0000 (UTC) Received: (qmail 77590 invoked by uid 500); 5 May 2015 09:27:50 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 77560 invoked by uid 500); 5 May 2015 09:27:50 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 77549 invoked by uid 99); 5 May 2015 09:27:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2015 09:27:50 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of root@apache.org designates 54.76.25.247 as permitted sender) Received: from [54.76.25.247] (HELO mx1-eu-west.apache.org) (54.76.25.247) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2015 09:27:26 +0000 Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 6325E253E3 for ; Tue, 5 May 2015 09:27:01 +0000 (UTC) Received: (qmail 74979 invoked by uid 99); 5 May 2015 09:26:58 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2015 09:26:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 74188E35A0; Tue, 5 May 2015 09:26:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sboikov@apache.org To: commits@ignite.incubator.apache.org Date: Tue, 05 May 2015 09:27:20 -0000 Message-Id: In-Reply-To: <7367e0a92f39444fa4f23daf16a4ff48@git.apache.org> References: <7367e0a92f39444fa4f23daf16a4ff48@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [23/50] incubator-ignite git commit: # ignite-838 X-Virus-Checked: Checked by ClamAV on apache.org # ignite-838 Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/dbd8d64a Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/dbd8d64a Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/dbd8d64a Branch: refs/heads/ignite-695 Commit: dbd8d64ab256ba1a5f4104fe3eef8d5ba24bc2e6 Parents: ef9b2d9 Author: sboikov Authored: Wed Apr 29 20:27:29 2015 +0300 Committer: sboikov Committed: Wed Apr 29 20:28:31 2015 +0300 ---------------------------------------------------------------------- .../org/apache/ignite/spi/IgniteSpiAdapter.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dbd8d64a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java index b43f8a5..871512c 100644 --- a/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java +++ b/modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiAdapter.java @@ -67,7 +67,7 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement private String name; /** Grid SPI context. */ - private volatile IgniteSpiContext spiCtx = new GridDummySpiContext(null, false); + private volatile IgniteSpiContext spiCtx = new GridDummySpiContext(null, false, null); /** Discovery listener. */ private GridLocalEventListener paramsLsnr; @@ -190,7 +190,7 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement ClusterNode locNode = spiCtx == null ? null : spiCtx.localNode(); // Set dummy no-op context. - spiCtx = new GridDummySpiContext(locNode, true); + spiCtx = new GridDummySpiContext(locNode, true, spiCtx); } /** @@ -551,15 +551,24 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement /** */ private final boolean stopping; + /** */ + private final MessageFactory msgFactory; + + /** */ + private final MessageFormatter msgFormatter; + /** * Create temp SPI context. * * @param locNode Local node. * @param stopping Node stopping flag. + * @param spiCtx SPI context. */ - GridDummySpiContext(ClusterNode locNode, boolean stopping) { + GridDummySpiContext(ClusterNode locNode, boolean stopping, @Nullable IgniteSpiContext spiCtx) { this.locNode = locNode; this.stopping = stopping; + this.msgFactory = spiCtx != null ? spiCtx.messageFactory() : null; + this.msgFormatter = spiCtx != null ? spiCtx.messageFormatter() : null; } /** {@inheritDoc} */ @@ -711,12 +720,12 @@ public abstract class IgniteSpiAdapter implements IgniteSpi, IgniteSpiManagement /** {@inheritDoc} */ @Override public MessageFormatter messageFormatter() { - return null; + return msgFormatter; } /** {@inheritDoc} */ @Override public MessageFactory messageFactory() { - return null; + return msgFactory; } /** {@inheritDoc} */