ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [49/50] [abbrv] incubator-ignite git commit: # ignite-410
Date Wed, 11 Mar 2015 10:34:18 GMT
# ignite-410


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

Branch: refs/heads/ignite-410
Commit: 7829963038b406b41087acf11c3b82772b8f7cdd
Parents: 1cbbd86
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Mar 11 13:07:46 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Mar 11 13:30:47 2015 +0300

----------------------------------------------------------------------
 .../internal/util/nio/GridNioFinishedFuture.java   | 10 +++++-----
 .../ignite/internal/util/nio/GridNioFuture.java    | 10 +++++-----
 .../internal/util/nio/GridNioFutureImpl.java       | 10 +++++-----
 .../ignite/internal/util/nio/GridNioServer.java    |  2 +-
 .../util/nio/GridSelectorNioSessionImpl.java       | 10 ++++------
 .../org/apache/ignite/thread/IgniteThread.java     | 17 -----------------
 6 files changed, 20 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78299630/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioFinishedFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioFinishedFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioFinishedFuture.java
index 9029dd2..1773b54 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioFinishedFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioFinishedFuture.java
@@ -25,7 +25,7 @@ import org.apache.ignite.internal.util.typedef.internal.*;
  */
 public class GridNioFinishedFuture<R> extends GridFinishedFuture<R> implements
GridNioFuture<R> {
     /** Message thread flag. */
-    private boolean msgThread;
+    private boolean backPressureDisabled;
 
     /**
      * @param res Result.
@@ -42,13 +42,13 @@ public class GridNioFinishedFuture<R> extends GridFinishedFuture<R>
implements G
     }
 
     /** {@inheritDoc} */
-    @Override public void messageThread(boolean msgThread) {
-        this.msgThread = msgThread;
+    @Override public void backPressureDisabled(boolean backPressureDisabled) {
+        this.backPressureDisabled = backPressureDisabled;
     }
 
     /** {@inheritDoc} */
-    @Override public boolean messageThread() {
-        return msgThread;
+    @Override public boolean backPressureDisabled() {
+        return backPressureDisabled;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78299630/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioFuture.java
index 7101f45..a7b1097 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioFuture.java
@@ -24,16 +24,16 @@ import org.apache.ignite.internal.*;
  */
 public interface GridNioFuture<R> extends IgniteInternalFuture<R> {
     /**
-     * Sets flag indicating that message send future was created in thread that was processing
a message.
+     * Sets flag indicating that back pressure should be disabled for message send future.
      *
-     * @param msgThread {@code True} if future was created in thread that is processing message.
+     * @param backPressureDisabled {@code True} if back pressure should be disabled for message
future.
      */
-    public void messageThread(boolean msgThread);
+    public void backPressureDisabled(boolean backPressureDisabled);
 
     /**
-     * @return {@code True} if future was created in thread that was processing message.
+     * @return {@code True} if back pressure disabled for message future.
      */
-    public boolean messageThread();
+    public boolean backPressureDisabled();
 
     /**
      * @return {@code True} if skip recovery for this operation.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78299630/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioFutureImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioFutureImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioFutureImpl.java
index c5393c4..10c7b72 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioFutureImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioFutureImpl.java
@@ -28,16 +28,16 @@ public class GridNioFutureImpl<R> extends GridFutureAdapter<R>
implements GridNi
     private static final long serialVersionUID = 0L;
 
     /** */
-    protected boolean msgThread;
+    protected boolean backPressureDisabled;
 
     /** {@inheritDoc} */
-    @Override public void messageThread(boolean msgThread) {
-        this.msgThread = msgThread;
+    @Override public void backPressureDisabled(boolean backPressureDisabled) {
+        this.backPressureDisabled = backPressureDisabled;
     }
 
     /** {@inheritDoc} */
-    @Override public boolean messageThread() {
-        return msgThread;
+    @Override public boolean backPressureDisabled() {
+        return backPressureDisabled;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78299630/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
index 57a3aae..ede1bd1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
@@ -446,7 +446,7 @@ public class GridNioServer<T> {
             GridNioFuture<?> fut0 = futs.iterator().next();
 
             for (GridNioFuture<?> fut : futs) {
-                fut.messageThread(true);
+                fut.backPressureDisabled(true);
 
                 ((NioOperationFuture)fut).resetSession(ses0);
             }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78299630/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 14abf4e..3184ee3 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
@@ -164,7 +164,7 @@ class GridSelectorNioSessionImpl extends GridNioSessionImpl {
      * @return Updated size of the queue.
      */
     int offerSystemFuture(GridNioFuture<?> writeFut) {
-        writeFut.messageThread(true);
+        writeFut.backPressureDisabled(true);
 
         boolean res = queue.offerFirst(writeFut);
 
@@ -184,12 +184,10 @@ class GridSelectorNioSessionImpl extends GridNioSessionImpl {
      * @return Updated size of the queue.
      */
     int offerFuture(GridNioFuture<?> writeFut) {
-        boolean msgThread = false;
-
-        if (sem != null && !msgThread)
+        if (sem != null)
             sem.acquireUninterruptibly();
 
-        writeFut.messageThread(msgThread);
+        writeFut.backPressureDisabled(false);
 
         boolean res = queue.offer(writeFut);
 
@@ -222,7 +220,7 @@ class GridSelectorNioSessionImpl extends GridNioSessionImpl {
         if (last != null) {
             queueSize.decrementAndGet();
 
-            if (sem != null && !last.messageThread())
+            if (sem != null && !last.backPressureDisabled())
                 sem.release();
 
             if (recovery != null) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/78299630/modules/core/src/main/java/org/apache/ignite/thread/IgniteThread.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/thread/IgniteThread.java b/modules/core/src/main/java/org/apache/ignite/thread/IgniteThread.java
index a956e30..0308dce 100644
--- a/modules/core/src/main/java/org/apache/ignite/thread/IgniteThread.java
+++ b/modules/core/src/main/java/org/apache/ignite/thread/IgniteThread.java
@@ -39,9 +39,6 @@ public class IgniteThread extends Thread {
     /** Number of all grid threads in the system. */
     private static final AtomicLong threadCntr = new AtomicLong(0);
 
-    /** Boolean flag indicating of this thread is currently processing message. */
-    private boolean procMsg;
-
     /**
      * Creates thread with given worker.
      *
@@ -87,20 +84,6 @@ public class IgniteThread extends Thread {
         return threadName + "-#" + num + '%' + gridName + '%';
     }
 
-    /**
-     * @param procMsg Flag indicating whether thread is currently processing message.
-     */
-    public void processingMessage(boolean procMsg) {
-        this.procMsg = procMsg;
-    }
-
-    /**
-     * @return Flag indicating whether thread is currently processing message.
-     */
-    public boolean processingMessage() {
-        return procMsg;
-    }
-
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(IgniteThread.class, this, "name", getName());


Mime
View raw message