Author: dkulp
Date: Wed Jul 11 21:15:36 2012
New Revision: 1360403
URL: http://svn.apache.org/viewvc?rev=1360403&view=rev
Log:
Change to ArrayBlockingQueue since size doesn't need to change and abq
doesn't need to create any objects for offer (less gc contention)
Modified:
cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Modified: cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=1360403&r1=1360402&r2=1360403&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
(original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Wed Jul
11 21:15:36 2012
@@ -27,8 +27,8 @@ import java.io.Writer;
import java.net.URL;
import java.util.Iterator;
import java.util.Stack;
+import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
import java.util.logging.Logger;
import javax.xml.namespace.NamespaceContext;
@@ -117,8 +117,8 @@ public final class StaxUtils {
if (i <= 0) {
i = 20;
}
- NS_AWARE_INPUT_FACTORY_POOL = new
LinkedBlockingQueue<XMLInputFactory>(i);
- OUTPUT_FACTORY_POOL = new LinkedBlockingQueue<XMLOutputFactory>(i);
+ NS_AWARE_INPUT_FACTORY_POOL = new
ArrayBlockingQueue<XMLInputFactory>(i);
+ OUTPUT_FACTORY_POOL = new ArrayBlockingQueue<XMLOutputFactory>(i);
try {
String s =
SystemPropertyAction.getProperty(INNER_ELEMENT_LEVEL_SYSTEM_PROP, "-1");
innerElementLevelThreshold = Integer.parseInt(s);