ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [3/9] incubator-ignite git commit: # IGNITE-141 - Marshallers refactoring
Date Thu, 05 Mar 2015 03:36:14 GMT
# IGNITE-141 - Marshallers refactoring


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

Branch: refs/heads/ignite-141
Commit: a851cd9468bba159636a1187348a3139a13aaaa4
Parents: 927678e
Author: Valentin Kulichenko <vkulichenko@gridgain.com>
Authored: Wed Mar 4 18:13:50 2015 -0800
Committer: Valentin Kulichenko <vkulichenko@gridgain.com>
Committed: Wed Mar 4 18:13:50 2015 -0800

----------------------------------------------------------------------
 .../managers/communication/GridIoManager.java   | 36 +-------------------
 1 file changed, 1 insertion(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/a851cd94/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
index de85182..748f9c2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoManager.java
@@ -131,9 +131,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         new GridBoundedConcurrentLinkedHashSet<>(MAX_CLOSED_TOPICS, MAX_CLOSED_TOPICS,
0.75f, 256,
             PER_SEGMENT_Q_OPTIMIZED_RMV);
 
-    /** Workers count. */
-    private final LongAdder workersCnt = new LongAdder();
-
     /** */
     private MessageFactory msgFactory;
 
@@ -586,8 +583,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         final GridIoMessage msg,
         final IgniteRunnable msgC
     ) {
-        workersCnt.increment();
-
         Runnable c = new GridWorker(ctx.gridName(), "msg-worker", log) {
             @Override protected void body() {
                 try {
@@ -607,8 +602,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
                 finally {
                     threadProcessingMessage(false);
 
-                    workersCnt.decrement();
-
                     msgC.run();
                 }
             }
@@ -638,8 +631,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         GridIoPolicy plc,
         final IgniteRunnable msgC
     ) {
-        workersCnt.increment();
-
         Runnable c = new GridWorker(ctx.gridName(), "msg-worker", log) {
             @Override protected void body() {
                 try {
@@ -650,8 +641,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
                 finally {
                     threadProcessingMessage(false);
 
-                    workersCnt.decrement();
-
                     msgC.run();
                 }
             }
@@ -834,9 +823,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
             return;
         }
 
-        // Set is not reserved and new worker should be submitted.
-        workersCnt.increment();
-
         final GridCommunicationMessageSet msgSet0 = set;
 
         Runnable c = new GridWorker(ctx.gridName(), "msg-worker", log) {
@@ -849,8 +835,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
                 finally {
                     threadProcessingMessage(false);
 
-                    workersCnt.decrement();
-
                     msgC.run();
                 }
             }
@@ -1349,26 +1333,13 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
         if (msgSets != null) {
             final GridMessageListener lsnrs0 = lsnrs;
 
-            boolean success = true;
-
             try {
                 for (final GridCommunicationMessageSet msgSet : msgSets) {
-                    success = false;
-
-                    workersCnt.increment();
-
                     pool(msgSet.policy()).execute(new GridWorker(ctx.gridName(), "msg-worker",
log) {
                         @Override protected void body() {
-                            try {
-                                unwindMessageSet(msgSet, lsnrs0);
-                            }
-                            finally {
-                                workersCnt.decrement();
-                            }
+                            unwindMessageSet(msgSet, lsnrs0);
                         }
                     });
-
-                    success = true;
                 }
             }
             catch (RejectedExecutionException e) {
@@ -1379,11 +1350,6 @@ public class GridIoManager extends GridManagerAdapter<CommunicationSpi<Serializa
                 for (GridCommunicationMessageSet msgSet : msgSets)
                     unwindMessageSet(msgSet, lsnr);
             }
-            finally {
-                // Decrement for last runnable submission of which failed.
-                if (!success)
-                    workersCnt.decrement();
-            }
         }
     }
 


Mime
View raw message