You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/02/04 09:13:55 UTC
ignite git commit: IGNITE-2540: Removed unnecessary ArrayList from
GridNioServer.DirectNioClientWorker write processing methods.
Repository: ignite
Updated Branches:
refs/heads/master 10a2b7a18 -> afd3bc1e3
IGNITE-2540: Removed unnecessary ArrayList from GridNioServer.DirectNioClientWorker write processing methods.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/afd3bc1e
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/afd3bc1e
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/afd3bc1e
Branch: refs/heads/master
Commit: afd3bc1e3c249ae86071f0d15b41c6eedbdeb050
Parents: 10a2b7a
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Thu Feb 4 11:13:36 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Feb 4 11:13:36 2016 +0300
----------------------------------------------------------------------
.../ignite/internal/util/nio/GridNioServer.java | 28 ++------------------
1 file changed, 2 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/afd3bc1e/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 84c8157..c7679c0 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
@@ -980,8 +980,6 @@ public class GridNioServer<T> {
NioOperationFuture<?> req = ses.removeMeta(NIO_OPERATION.ordinal());
- List<NioOperationFuture<?>> doneFuts = null;
-
while (true) {
if (req == null) {
req = (NioOperationFuture<?>)ses.pollFuture();
@@ -1012,10 +1010,7 @@ public class GridNioServer<T> {
// Fill up as many messages as possible to write buffer.
while (finished) {
- if (doneFuts == null)
- doneFuts = new ArrayList<>();
-
- doneFuts.add(req);
+ req.onDone();
req = (NioOperationFuture<?>)ses.pollFuture();
@@ -1059,13 +1054,6 @@ public class GridNioServer<T> {
if (!skipWrite) {
int cnt = sockCh.write(buf);
- if (!F.isEmpty(doneFuts)) {
- for (int i = 0; i < doneFuts.size(); i++)
- doneFuts.get(i).onDone();
-
- doneFuts.clear();
- }
-
if (log.isTraceEnabled())
log.trace("Bytes sent [sockCh=" + sockCh + ", cnt=" + cnt + ']');
@@ -1185,13 +1173,8 @@ public class GridNioServer<T> {
}
// Fill up as many messages as possible to write buffer.
- List<NioOperationFuture<?>> doneFuts = null;
-
while (finished) {
- if (doneFuts == null)
- doneFuts = new ArrayList<>();
-
- doneFuts.add(req);
+ req.onDone();
req = (NioOperationFuture<?>)ses.pollFuture();
@@ -1218,13 +1201,6 @@ public class GridNioServer<T> {
if (!skipWrite) {
int cnt = sockCh.write(buf);
- if (!F.isEmpty(doneFuts)) {
- for (int i = 0; i < doneFuts.size(); i++)
- doneFuts.get(i).onDone();
-
- doneFuts.clear();
- }
-
if (log.isTraceEnabled())
log.trace("Bytes sent [sockCh=" + sockCh + ", cnt=" + cnt + ']');