tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1478535 - /tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
Date Thu, 02 May 2013 20:56:35 GMT
Author: markt
Date: Thu May  2 20:56:34 2013
New Revision: 1478535

URL: http://svn.apache.org/r1478535
Log:
Rename for clarity

Modified:
    tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java?rev=1478535&r1=1478534&r2=1478535&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java Thu May  2 20:56:34
2013
@@ -88,7 +88,7 @@ public class InternalNioOutputBuffer ext
     /**
      * For "non-blocking" writes use an external buffer.
      */
-    protected volatile LinkedBlockingDeque<ByteBufferHolder> bufferedWrite = null;
+    protected volatile LinkedBlockingDeque<ByteBufferHolder> bufferedWrites = null;
 
     /**
      * The max size of the buffered write buffer
@@ -278,11 +278,11 @@ public class InternalNioOutputBuffer ext
     }
 
     private void addToBuffers(byte[] buf, int offset, int length) {
-        ByteBufferHolder holder = bufferedWrite.peekLast();
+        ByteBufferHolder holder = bufferedWrites.peekLast();
         if (holder==null || holder.isFlipped() || holder.getBuf().remaining()<length)
{
             ByteBuffer buffer = ByteBuffer.allocate(Math.max(bufferedWriteSize,length));
             holder = new ByteBufferHolder(buffer,false);
-            bufferedWrite.add(holder);
+            bufferedWrites.add(holder);
         }
         holder.getBuf().put(buf,offset,length);
     }
@@ -310,8 +310,8 @@ public class InternalNioOutputBuffer ext
 
         dataLeft = hasMoreDataToFlush();
 
-        if (!dataLeft && bufferedWrite!=null) {
-            Iterator<ByteBufferHolder> bufIter = bufferedWrite.iterator();
+        if (!dataLeft && bufferedWrites!=null) {
+            Iterator<ByteBufferHolder> bufIter = bufferedWrites.iterator();
             while (!hasMoreDataToFlush() && bufIter.hasNext()) {
                 ByteBufferHolder buffer = bufIter.next();
                 buffer.flip();
@@ -357,9 +357,9 @@ public class InternalNioOutputBuffer ext
     @Override
     public void setBlocking(boolean blocking) {
         if (blocking)
-            bufferedWrite = null;
+            bufferedWrites = null;
         else
-            bufferedWrite = new LinkedBlockingDeque<>();
+            bufferedWrites = new LinkedBlockingDeque<>();
     }
 
     public void setBufferedWriteSize(int bufferedWriteSize) {
@@ -368,8 +368,8 @@ public class InternalNioOutputBuffer ext
 
     private boolean hasBufferedData() {
         boolean result = false;
-        if (bufferedWrite!=null) {
-            Iterator<ByteBufferHolder> iter = bufferedWrite.iterator();
+        if (bufferedWrites!=null) {
+            Iterator<ByteBufferHolder> iter = bufferedWrites.iterator();
             while (!result && iter.hasNext()) {
                 result = iter.next().hasData();
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message