ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [47/50] [abbrv] incubator-ignite git commit: # IGNITE-943 Move static class instances.
Date Mon, 01 Jun 2015 17:36:08 GMT
# 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 <sevdokimov@gridgain.com>
Authored: Mon Jun 1 14:41:08 2015 +0300
Committer: sevdokimov <sevdokimov@gridgain.com>
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<String, Collection<ServiceContextImpl>> locSvcs = new HashMap<>();
 
@@ -352,7 +346,8 @@ public class GridServiceProcessor extends GridProcessorAdapter {
                                 "different configuration) [deployed=" + dep.configuration()
+ ", new=" + cfg + ']'));
                         }
                         else {
-                            Iterator<Cache.Entry<Object, Object>> it = serviceEntries(ASSIGNMENTS_PREDICATE);
+                            Iterator<Cache.Entry<Object, Object>> it = serviceEntries(
+                                ServiceAssignmentsPredicate.INSTANCE);
 
                             while (it.hasNext()) {
                                 Cache.Entry<Object, Object> e = it.next();
@@ -448,7 +443,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
     public IgniteInternalFuture<?> cancelAll() {
         Collection<IgniteInternalFuture<?>> futs = new ArrayList<>();
 
-        Iterator<Cache.Entry<Object, Object>> it = serviceEntries(DEPLOYMENT_PREDICATE);
+        Iterator<Cache.Entry<Object, Object>> it = serviceEntries(ServiceDeploymentPredicate.INSTANCE);
 
         while (it.hasNext()) {
             Cache.Entry<Object, Object> e = it.next();
@@ -471,7 +466,7 @@ public class GridServiceProcessor extends GridProcessorAdapter {
     public Collection<ServiceDescriptor> serviceDescriptors() {
         Collection<ServiceDescriptor> descs = new ArrayList<>();
 
-        Iterator<Cache.Entry<Object, Object>> it = serviceEntries(DEPLOYMENT_PREDICATE);
+        Iterator<Cache.Entry<Object, Object>> it = serviceEntries(ServiceDeploymentPredicate.INSTANCE);
 
         while (it.hasNext()) {
             Cache.Entry<Object, Object> e = it.next();
@@ -1113,7 +1108,8 @@ public class GridServiceProcessor extends GridProcessorAdapter {
                                 ctx.cache().context().deploy().ignoreOwnership(true);
 
                             try {
-                                Iterator<Cache.Entry<Object, Object>> it = serviceEntries(DEPLOYMENT_PREDICATE);
+                                Iterator<Cache.Entry<Object, Object>> it = serviceEntries(
+                                    ServiceDeploymentPredicate.INSTANCE);
 
                                 while (it.hasNext()) {
                                     Cache.Entry<Object, Object> e = it.next();
@@ -1332,6 +1328,9 @@ public class GridServiceProcessor extends GridProcessorAdapter {
      */
     static class ServiceDeploymentPredicate implements IgniteBiPredicate<Object, Object>
{
         /** */
+        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<Object, Object>
{
         /** */
+        static final ServiceAssignmentsPredicate INSTANCE = new ServiceAssignmentsPredicate();
+
+        /** */
         private static final long serialVersionUID = 0L;
 
         /** {@inheritDoc} */


Mime
View raw message