[Swift-commit] cog r3891

swift at ci.uchicago.edu swift at ci.uchicago.edu
Sat Apr 12 16:40:04 CDT 2014


------------------------------------------------------------------------
r3891 | hategan | 2014-04-12 16:39:49 -0500 (Sat, 12 Apr 2014) | 1 line

don't enable stream compression by default (bug 1233)
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/coaster/channels/GSSChannel.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/coaster/channels/GSSChannel.java	(revision 3890)
+++ modules/provider-coaster/src/org/globus/cog/coaster/channels/GSSChannel.java	(working copy)
@@ -37,6 +37,12 @@
 public class GSSChannel extends AbstractTCPChannel {
 	private static final Logger logger = Logger.getLogger(GSSChannel.class);
 
+	private static final boolean streamCompression;
+	
+	static {
+	    streamCompression = "true".equals(System.getProperty("gss.channel.compression.enabled"));
+	}
+
 	private GssSocket socket;
 	private String peerId;
 	private boolean shuttingDown;
@@ -161,12 +167,22 @@
 
 	@Override
     protected void setInputStream(InputStream inputStream) {
-        super.setInputStream(new InflaterInputStream(inputStream));
+	    if (streamCompression) {
+	        super.setInputStream(new InflaterInputStream(inputStream));
+	    }
+	    else {
+	        super.setInputStream(inputStream);
+	    }
     }
 
     @Override
     protected void setOutputStream(OutputStream outputStream) {
-        super.setOutputStream(new DeflaterOutputStream(outputStream, true));
+        if (streamCompression) {
+            super.setOutputStream(new DeflaterOutputStream(outputStream, true));
+        }
+        else {
+            super.setOutputStream(outputStream);
+        }
     }
 
     protected void register() {



More information about the Swift-commit mailing list