ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [48/68] [abbrv] ignite git commit: ignite-comm-opts2
Date Tue, 27 Sep 2016 15:26:38 GMT
ignite-comm-opts2


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

Branch: refs/heads/ignite-comm-opts2
Commit: f0857c5d76b39ff5380a60720829e15a5fa79ab4
Parents: d7d198e
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Sep 26 16:12:09 2016 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Sep 26 16:12:09 2016 +0300

----------------------------------------------------------------------
 .../util/nio/GridSelectorNioSessionImpl.java       | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f0857c5d/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridSelectorNioSessionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridSelectorNioSessionImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridSelectorNioSessionImpl.java
index ee494b8..b36184c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridSelectorNioSessionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridSelectorNioSessionImpl.java
@@ -23,7 +23,6 @@ import java.nio.channels.SelectionKey;
 import java.util.Collection;
 import java.util.concurrent.Semaphore;
 import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.ignite.IgniteLogger;
 import org.apache.ignite.internal.util.tostring.GridToStringExclude;
 import org.apache.ignite.internal.util.typedef.internal.LT;
@@ -47,9 +46,6 @@ class GridSelectorNioSessionImpl extends GridNioSessionImpl {
     /** Worker index for server */
     private final int selectorIdx;
 
-    /** Size counter. */
-    //private final AtomicInteger queueSize = new AtomicInteger();
-
     /** Semaphore. */
     @GridToStringExclude
     private final Semaphore sem;
@@ -69,6 +65,7 @@ class GridSelectorNioSessionImpl extends GridNioSessionImpl {
     /** Logger. */
     private final IgniteLogger log;
 
+    /** */
     public final AtomicBoolean processWrite = new AtomicBoolean();
 
     /**
@@ -176,7 +173,7 @@ class GridSelectorNioSessionImpl extends GridNioSessionImpl {
 
         assert res : "Future was not added to queue";
 
-        return 0;//queueSize.incrementAndGet();
+        return queue.sizex();
     }
 
     /**
@@ -201,7 +198,7 @@ class GridSelectorNioSessionImpl extends GridNioSessionImpl {
 
         assert res : "Future was not added to queue";
 
-        return 0;//queueSize.incrementAndGet();
+        return queue.sizex();
     }
 
     /**
@@ -213,10 +210,6 @@ class GridSelectorNioSessionImpl extends GridNioSessionImpl {
         boolean add = queue.addAll(futs);
 
         assert add;
-
-        //boolean set = queueSize.compareAndSet(0, futs.size());
-
-        //assert set;
     }
 
     /**
@@ -226,8 +219,6 @@ class GridSelectorNioSessionImpl extends GridNioSessionImpl {
         GridNioFuture<?> last = queue.poll();
 
         if (last != null) {
-            //queueSize.decrementAndGet();
-
             if (sem != null && !last.messageThread())
                 sem.release();
 
@@ -267,7 +258,7 @@ class GridSelectorNioSessionImpl extends GridNioSessionImpl {
      * @return Number of write requests.
      */
     int writeQueueSize() {
-        return queue.sizex();//queueSize.get();
+        return queue.sizex();
     }
 
     /**


Mime
View raw message