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 9C7EF18C1E for ; Mon, 1 Jun 2015 17:35:48 +0000 (UTC) Received: (qmail 46516 invoked by uid 500); 1 Jun 2015 17:35:48 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 46472 invoked by uid 500); 1 Jun 2015 17:35:48 -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 46463 invoked by uid 99); 1 Jun 2015 17:35:48 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2015 17:35:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id E81F71A4268 for ; Mon, 1 Jun 2015 17:35:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.791 X-Spam-Level: X-Spam-Status: No, score=0.791 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id skAFUy0XmifO for ; Mon, 1 Jun 2015 17:35:32 +0000 (UTC) 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 C189628071 for ; Mon, 1 Jun 2015 17:35:25 +0000 (UTC) Received: (qmail 43944 invoked by uid 99); 1 Jun 2015 17:35:23 -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; Mon, 01 Jun 2015 17:35:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 21366E0613; Mon, 1 Jun 2015 17:35:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vkulichenko@apache.org To: commits@ignite.incubator.apache.org Date: Mon, 01 Jun 2015 17:36:08 -0000 Message-Id: In-Reply-To: <1c7826ec26964bfc8d6f79e1395cc83d@git.apache.org> References: <1c7826ec26964bfc8d6f79e1395cc83d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [47/50] [abbrv] incubator-ignite git commit: # IGNITE-943 Move static class instances. # IGNITE-943 Move static class instances. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ab4c18ca Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ab4c18ca Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ab4c18ca Branch: refs/heads/ignite-891 Commit: ab4c18caca9f3bd5dbc3174eb49ed79c1744a79d Parents: 6c837c0 Author: sevdokimov Authored: Mon Jun 1 14:41:08 2015 +0300 Committer: sevdokimov Committed: Mon Jun 1 14:41:08 2015 +0300 ---------------------------------------------------------------------- .../service/GridServiceProcessor.java | 22 +++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ab4c18ca/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java index 8eff6bd..2e31b69 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java @@ -60,12 +60,6 @@ public class GridServiceProcessor extends GridProcessorAdapter { /** Time to wait before reassignment retries. */ private static final long RETRY_TIMEOUT = 1000; - /** */ - private static final ServiceDeploymentPredicate DEPLOYMENT_PREDICATE = new ServiceDeploymentPredicate(); - - /** */ - private static final ServiceAssignmentsPredicate ASSIGNMENTS_PREDICATE = new ServiceAssignmentsPredicate(); - /** Local service instances. */ private final Map> locSvcs = new HashMap<>(); @@ -352,7 +346,8 @@ public class GridServiceProcessor extends GridProcessorAdapter { "different configuration) [deployed=" + dep.configuration() + ", new=" + cfg + ']')); } else { - Iterator> it = serviceEntries(ASSIGNMENTS_PREDICATE); + Iterator> it = serviceEntries( + ServiceAssignmentsPredicate.INSTANCE); while (it.hasNext()) { Cache.Entry e = it.next(); @@ -448,7 +443,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { public IgniteInternalFuture cancelAll() { Collection> futs = new ArrayList<>(); - Iterator> it = serviceEntries(DEPLOYMENT_PREDICATE); + Iterator> it = serviceEntries(ServiceDeploymentPredicate.INSTANCE); while (it.hasNext()) { Cache.Entry e = it.next(); @@ -471,7 +466,7 @@ public class GridServiceProcessor extends GridProcessorAdapter { public Collection serviceDescriptors() { Collection descs = new ArrayList<>(); - Iterator> it = serviceEntries(DEPLOYMENT_PREDICATE); + Iterator> it = serviceEntries(ServiceDeploymentPredicate.INSTANCE); while (it.hasNext()) { Cache.Entry e = it.next(); @@ -1113,7 +1108,8 @@ public class GridServiceProcessor extends GridProcessorAdapter { ctx.cache().context().deploy().ignoreOwnership(true); try { - Iterator> it = serviceEntries(DEPLOYMENT_PREDICATE); + Iterator> it = serviceEntries( + ServiceDeploymentPredicate.INSTANCE); while (it.hasNext()) { Cache.Entry e = it.next(); @@ -1332,6 +1328,9 @@ public class GridServiceProcessor extends GridProcessorAdapter { */ static class ServiceDeploymentPredicate implements IgniteBiPredicate { /** */ + static final ServiceDeploymentPredicate INSTANCE = new ServiceDeploymentPredicate(); + + /** */ private static final long serialVersionUID = 0L; /** {@inheritDoc} */ @@ -1350,6 +1349,9 @@ public class GridServiceProcessor extends GridProcessorAdapter { */ static class ServiceAssignmentsPredicate implements IgniteBiPredicate { /** */ + static final ServiceAssignmentsPredicate INSTANCE = new ServiceAssignmentsPredicate(); + + /** */ private static final long serialVersionUID = 0L; /** {@inheritDoc} */