hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1631090 - in /httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol: BasicAsyncRequestProducer.java BasicAsyncResponseProducer.java
Date Sat, 11 Oct 2014 17:46:36 GMT
Author: olegk
Date: Sat Oct 11 17:46:36 2014
New Revision: 1631090

URL: http://svn.apache.org/r1631090
Log:
Do not synchronize methods of BasicAsyncRequestProducer and BasicAsyncResponseProducer

Modified:
    httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncRequestProducer.java
    httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncResponseProducer.java

Modified: httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncRequestProducer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncRequestProducer.java?rev=1631090&r1=1631089&r2=1631090&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncRequestProducer.java
(original)
+++ httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncRequestProducer.java
Sat Oct 11 17:46:36 2014
@@ -32,7 +32,6 @@ import org.apache.http.HttpEntity;
 import org.apache.http.HttpEntityEnclosingRequest;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpRequest;
-import org.apache.http.annotation.ThreadSafe;
 import org.apache.http.nio.ContentEncoder;
 import org.apache.http.nio.IOControl;
 import org.apache.http.nio.entity.EntityAsyncContentProducer;
@@ -50,7 +49,6 @@ import org.apache.http.util.Args;
  *
  * @since 4.2
  */
-@ThreadSafe
 public class BasicAsyncRequestProducer implements HttpAsyncRequestProducer {
 
     private final HttpHost target;
@@ -110,7 +108,7 @@ public class BasicAsyncRequestProducer i
         }
     }
 
-    public synchronized HttpRequest generateRequest() {
+    public HttpRequest generateRequest() {
         return this.request;
     }
 
@@ -118,7 +116,7 @@ public class BasicAsyncRequestProducer i
         return this.target;
     }
 
-    public synchronized void produceContent(
+    public void produceContent(
             final ContentEncoder encoder, final IOControl ioctrl) throws IOException {
         if (this.producer != null) {
             this.producer.produceContent(encoder, ioctrl);
@@ -134,17 +132,17 @@ public class BasicAsyncRequestProducer i
     public void failed(final Exception ex) {
     }
 
-    public synchronized boolean isRepeatable() {
+    public boolean isRepeatable() {
         return this.producer == null || this.producer.isRepeatable();
     }
 
-    public synchronized void resetRequest() throws IOException {
+    public void resetRequest() throws IOException {
         if (this.producer != null) {
             this.producer.close();
         }
     }
 
-    public synchronized void close() throws IOException {
+    public void close() throws IOException {
         if (this.producer != null) {
             this.producer.close();
         }

Modified: httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncResponseProducer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncResponseProducer.java?rev=1631090&r1=1631089&r2=1631090&view=diff
==============================================================================
--- httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncResponseProducer.java
(original)
+++ httpcomponents/httpcore/branches/4.3.x/httpcore-nio/src/main/java/org/apache/http/nio/protocol/BasicAsyncResponseProducer.java
Sat Oct 11 17:46:36 2014
@@ -31,7 +31,6 @@ import java.io.IOException;
 
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpResponse;
-import org.apache.http.annotation.ThreadSafe;
 import org.apache.http.nio.ContentEncoder;
 import org.apache.http.nio.IOControl;
 import org.apache.http.nio.entity.EntityAsyncContentProducer;
@@ -43,14 +42,13 @@ import org.apache.http.util.Args;
  * Basic implementation of {@link HttpAsyncResponseProducer}. The producer
  * can make use of the {@link HttpAsyncContentProducer} interface to
  * efficiently stream out message content to the underlying non-blocking HTTP
- * connection, if it is implemented by the {@link HttpEntity} inclosed in
+ * connection, if it is implemented by the {@link HttpEntity} enclosed in
  * the response.
  *
  * @see HttpAsyncContentProducer
  *
  * @since 4.2
  */
-@ThreadSafe
 public class BasicAsyncResponseProducer implements HttpAsyncResponseProducer {
 
     private final HttpResponse response;
@@ -99,11 +97,11 @@ public class BasicAsyncResponseProducer 
         }
     }
 
-    public synchronized HttpResponse generateResponse() {
+    public HttpResponse generateResponse() {
         return this.response;
     }
 
-    public synchronized void produceContent(
+    public void produceContent(
             final ContentEncoder encoder, final IOControl ioctrl) throws IOException {
         if (this.producer != null) {
             this.producer.produceContent(encoder, ioctrl);
@@ -119,7 +117,7 @@ public class BasicAsyncResponseProducer 
     public void failed(final Exception ex) {
     }
 
-    public synchronized void close() throws IOException {
+    public void close() throws IOException {
         if (this.producer != null) {
             this.producer.close();
         }



Mime
View raw message