ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sevdoki...@apache.org
Subject [2/3] incubator-ignite git commit: Cleanup code
Date Mon, 16 Mar 2015 12:10:08 GMT
Cleanup code


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

Branch: refs/heads/ignite-421
Commit: c9b0bb219331be024430079c65b763e3184458cc
Parents: 953e7b3
Author: sevdokimov <sevdokimov@gridgain.com>
Authored: Mon Mar 16 12:33:57 2015 +0300
Committer: sevdokimov <sevdokimov@gridgain.com>
Committed: Mon Mar 16 12:33:57 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/IgniteCacheProxy.java      | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c9b0bb21/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index f425904..c7989ef 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -18,8 +18,8 @@
 package org.apache.ignite.internal.processors.cache;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.CacheManager;
+import org.apache.ignite.cache.*;
 import org.apache.ignite.cache.query.*;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
@@ -42,7 +42,6 @@ import javax.cache.integration.*;
 import javax.cache.processor.*;
 import java.io.*;
 import java.util.*;
-import java.util.concurrent.atomic.*;
 import java.util.concurrent.locks.*;
 
 /**
@@ -111,7 +110,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
 
         gate = ctx.gate();
 
-        legacyProxy = new GridCacheProxyImpl<K, V>(ctx, delegate, prj);
+        legacyProxy = new GridCacheProxyImpl<>(ctx, delegate, prj);
     }
 
     /**
@@ -326,7 +325,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
 
         return new QueryCursorImpl<>(new GridCloseableIteratorAdapter<Entry<K,V>>()
{
             /** */
-            Map.Entry<K,V> cur;
+            private Map.Entry<K,V> cur;
 
             @Override protected Entry<K,V> onNext() throws IgniteCheckedException {
                 if (!onHasNext())
@@ -350,11 +349,11 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
     }
 
     /**
-     * @param local Enforce local.
+     * @param loc Enforce local.
      * @return Local node cluster group.
      */
-    private ClusterGroup projection(boolean local) {
-        return local || ctx.isLocal() || ctx.isReplicated() ? ctx.kernalContext().grid().cluster().forLocal()
: null;
+    private ClusterGroup projection(boolean loc) {
+        return loc || ctx.isLocal() || ctx.isReplicated() ? ctx.kernalContext().grid().cluster().forLocal()
: null;
     }
 
     /**
@@ -1586,6 +1585,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
         /** */
         private X cur;
 
+        /** */
         private CacheQueryFuture<X> fut;
 
         /**
@@ -1595,6 +1595,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
             this.fut = fut;
         }
 
+        /** {@inheritDoc} */
         @Override protected Y onNext() throws IgniteCheckedException {
             if (!onHasNext())
                 throw new NoSuchElementException();
@@ -1606,12 +1607,17 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
             return convert(e);
         }
 
+        /**
+         * @param x X.
+         */
         protected abstract Y convert(X x);
 
+        /** {@inheritDoc} */
         @Override protected boolean onHasNext() throws IgniteCheckedException {
             return cur != null || (cur = fut.next()) != null;
         }
 
+        /** {@inheritDoc} */
         @Override protected void onClose() throws IgniteCheckedException {
             fut.cancel();
         }


Mime
View raw message