You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2015/01/15 10:20:43 UTC
svn commit: r1651998 - in /tomcat/trunk/java/org/apache/coyote/http11:
AbstractInputBuffer.java InternalAprInputBuffer.java
InternalNio2InputBuffer.java InternalNioInputBuffer.java
Author: markt
Date: Thu Jan 15 09:20:42 2015
New Revision: 1651998
URL: http://svn.apache.org/r1651998
Log:
Revert the parallel ByteBuffer idea
Modified:
tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java
tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java
tomcat/trunk/java/org/apache/coyote/http11/InternalNio2InputBuffer.java
tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java?rev=1651998&r1=1651997&r2=1651998&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractInputBuffer.java Thu Jan 15 09:20:42 2015
@@ -118,26 +118,10 @@ public abstract class AbstractInputBuffe
/**
- * The read buffer represented as a byte[].
- * <p>
- * SocketWrapper uses ByteBuffer (since reading from socket to ByteBuffer is
- * the only API common to all current I/O implementations) but this class
- * uses byte[] since that is more efficient for parsing. readByteBuffer
- * therefore wraps buf. The byte[] representation is only used for reading.
- * The ByteBuffer representation is only used for writing.
+ * The read buffer.
*/
protected byte[] buf;
- /**
- * The read buffer represented as a ByteBuffer.
- * <p>
- * SocketWrapper uses ByteBuffer (since reading from socket to ByteBuffer is
- * the only API common to all current I/O implementations) but this class
- * uses byte[] since that is more efficient for parsing. readByteBuffer
- * therefore wraps buf. The byte[] representation is only used for reading.
- * The ByteBuffer representation is only used for writing.
- */
- protected ByteBuffer readByteBuffer;
/**
* Last valid byte.
@@ -387,7 +371,6 @@ public abstract class AbstractInputBuffe
// Reset pointers
lastValid = lastValid - pos;
- readByteBuffer.position(lastValid);
pos = 0;
lastActiveFilter = -1;
parsingHeader = true;
@@ -648,8 +631,6 @@ public abstract class AbstractInputBuffe
byte[] tmp = new byte[newsize];
System.arraycopy(buf,0,tmp,0,buf.length);
buf = tmp;
- readByteBuffer = ByteBuffer.wrap(buf);
- readByteBuffer.position(lastValid);
}
}
Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java?rev=1651998&r1=1651997&r2=1651998&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalAprInputBuffer.java Thu Jan 15 09:20:42 2015
@@ -17,7 +17,6 @@
package org.apache.coyote.http11;
import java.io.IOException;
-import java.nio.ByteBuffer;
import org.apache.coyote.InputBuffer;
import org.apache.coyote.Request;
@@ -85,7 +84,6 @@ public class InternalAprInputBuffer exte
int bufLength = Math.max(headerBufferSize, 8192);
if (buf == null || buf.length < bufLength) {
buf = new byte[bufLength];
- readByteBuffer = ByteBuffer.wrap(buf);
}
}
Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNio2InputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNio2InputBuffer.java?rev=1651998&r1=1651997&r2=1651998&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNio2InputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNio2InputBuffer.java Thu Jan 15 09:20:42 2015
@@ -146,7 +146,6 @@ public class InternalNio2InputBuffer ext
int bufLength = headerBufferSize + socketReadBufferSize;
if (buf == null || buf.length < bufLength) {
buf = new byte[bufLength];
- readByteBuffer = ByteBuffer.wrap(buf);
}
// Initialize the completion handler
Modified: tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java?rev=1651998&r1=1651997&r2=1651998&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/InternalNioInputBuffer.java Thu Jan 15 09:20:42 2015
@@ -98,7 +98,6 @@ public class InternalNioInputBuffer exte
int bufLength = headerBufferSize + socketReadBufferSize;
if (buf == null || buf.length < bufLength) {
buf = new byte[bufLength];
- readByteBuffer = ByteBuffer.wrap(buf);
}
pool = ((NioEndpoint)endpoint).getSelectorPool();
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org