[jboss-cvs] Repository SVN: r1264 - in oswego-concurrent: 1.3.4-jboss and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Sep 11 09:10:23 EDT 2007
Author: adrian at jboss.org
Date: 2007-09-11 09:10:22 -0400 (Tue, 11 Sep 2007)
New Revision: 1264
Added:
oswego-concurrent/1.3.4-jboss/
oswego-concurrent/1.3.4-jboss/component-info.xml
oswego-concurrent/1.3.4-jboss/lib/
oswego-concurrent/1.3.4-jboss/lib/concurrent-src.zip
oswego-concurrent/1.3.4-jboss/lib/concurrent.jar
oswego-concurrent/1.3.4-jboss/src/
oswego-concurrent/1.3.4-jboss/src/ConcurrentHashMap.patch
oswego-concurrent/1.3.4-jboss/src/PooledExecutor.patch
oswego-concurrent/1.3.4-jboss/src/README.txt
oswego-concurrent/1.3.4-jboss/src/concurrent-build.patch
oswego-concurrent/1.3.4-jboss/src/concurrent.zip
Log:
JBAS-4698 - Latest version of oswego concurrent including unreleased patches to 1.3.4
Added: oswego-concurrent/1.3.4-jboss/component-info.xml
===================================================================
--- oswego-concurrent/1.3.4-jboss/component-info.xml (rev 0)
+++ oswego-concurrent/1.3.4-jboss/component-info.xml 2007-09-11 13:10:22 UTC (rev 1264)
@@ -0,0 +1,16 @@
+<project name="oswego-concurrent-component-info">
+ <!-- ============================================================ -->
+ <!-- Oswego Concurrent Library -->
+ <!-- ============================================================ -->
+ <component id="oswego-concurrent"
+ licenseType="oswego"
+ version="1.3.4-jboss"
+ projectHome="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html"
+ description="Oswego util.concurrent package">
+ <artifact id="concurrent.jar"/>
+ <artifact id="concurrent-src.zip"/>
+ <export>
+ <include input="concurrent.jar"/>
+ </export>
+ </component>
+</project>
Added: oswego-concurrent/1.3.4-jboss/lib/concurrent-src.zip
===================================================================
(Binary files differ)
Property changes on: oswego-concurrent/1.3.4-jboss/lib/concurrent-src.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: oswego-concurrent/1.3.4-jboss/lib/concurrent.jar
===================================================================
(Binary files differ)
Property changes on: oswego-concurrent/1.3.4-jboss/lib/concurrent.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: oswego-concurrent/1.3.4-jboss/src/ConcurrentHashMap.patch
===================================================================
--- oswego-concurrent/1.3.4-jboss/src/ConcurrentHashMap.patch (rev 0)
+++ oswego-concurrent/1.3.4-jboss/src/ConcurrentHashMap.patch 2007-09-11 13:10:22 UTC (rev 1264)
@@ -0,0 +1,94 @@
+--- src/EDU/oswego/cs/dl/util/concurrent/ConcurrentHashMap.java 2007-09-11 14:32:37.000000000 +0200
++++ /home/ejort/temp/ConcurrentHashMap.java 2005-07-15 20:47:11.000000000 +0200
+@@ -19,20 +19,22 @@
+ Date Who What
+ 26nov2000 dl Created, based on ConcurrentReaderHashMap
+ 12jan2001 dl public release
+ 17nov2001 dl Minor tunings
+ 24oct2003 dl Segment implements Serializable
++ 23jun2004 dl Avoid bad array sizings in view toArray methods
+ */
+
+ package EDU.oswego.cs.dl.util.concurrent;
+
+ import java.util.Map;
+ import java.util.AbstractMap;
+ import java.util.AbstractSet;
+ import java.util.AbstractCollection;
+ import java.util.Collection;
+ import java.util.Set;
++import java.util.ArrayList;
+ import java.util.Iterator;
+ import java.util.Enumeration;
+ import java.util.NoSuchElementException;
+
+ import java.io.Serializable;
+@@ -877,10 +879,22 @@
+ return ConcurrentHashMap.this.remove(o) != null;
+ }
+ public void clear() {
+ ConcurrentHashMap.this.clear();
+ }
++ public Object[] toArray() {
++ Collection c = new ArrayList();
++ for (Iterator i = iterator(); i.hasNext(); )
++ c.add(i.next());
++ return c.toArray();
++ }
++ public Object[] toArray(Object[] a) {
++ Collection c = new ArrayList();
++ for (Iterator i = iterator(); i.hasNext(); )
++ c.add(i.next());
++ return c.toArray(a);
++ }
+ }
+
+ /**
+ * Returns a collection view of the values contained in this map. The
+ * collection is backed by the map, so changes to the map are reflected in
+@@ -909,10 +923,22 @@
+ return ConcurrentHashMap.this.containsValue(o);
+ }
+ public void clear() {
+ ConcurrentHashMap.this.clear();
+ }
++ public Object[] toArray() {
++ Collection c = new ArrayList();
++ for (Iterator i = iterator(); i.hasNext(); )
++ c.add(i.next());
++ return c.toArray();
++ }
++ public Object[] toArray(Object[] a) {
++ Collection c = new ArrayList();
++ for (Iterator i = iterator(); i.hasNext(); )
++ c.add(i.next());
++ return c.toArray(a);
++ }
+ }
+
+ /**
+ * Returns a collection view of the mappings contained in this map. Each
+ * element in the returned collection is a <tt>Map.Entry</tt>. The
+@@ -952,10 +978,22 @@
+ return ConcurrentHashMap.this.size();
+ }
+ public void clear() {
+ ConcurrentHashMap.this.clear();
+ }
++ public Object[] toArray() {
++ Collection c = new ArrayList();
++ for (Iterator i = iterator(); i.hasNext(); )
++ c.add(i.next());
++ return c.toArray();
++ }
++ public Object[] toArray(Object[] a) {
++ Collection c = new ArrayList();
++ for (Iterator i = iterator(); i.hasNext(); )
++ c.add(i.next());
++ return c.toArray(a);
++ }
+ }
+
+ /**
+ * Returns an enumeration of the keys in this table.
+ *
Added: oswego-concurrent/1.3.4-jboss/src/PooledExecutor.patch
===================================================================
--- oswego-concurrent/1.3.4-jboss/src/PooledExecutor.patch (rev 0)
+++ oswego-concurrent/1.3.4-jboss/src/PooledExecutor.patch 2007-09-11 13:10:22 UTC (rev 1264)
@@ -0,0 +1,47 @@
+--- src/EDU/oswego/cs/dl/util/concurrent/PooledExecutor.java 2007-09-11 14:32:37.000000000 +0200
++++ /home/ejort/temp/PooledExecutor.java 2005-07-15 20:47:08.000000000 +0200
+@@ -27,10 +27,11 @@
+ Simplify locking scheme
+ 25jan2001 dl {get,set}BlockedExecutionHandler now public
+ 17may2002 dl null out task var in worker run to enable GC.
+ 30aug2003 dl check for new tasks when timing out
+ 18feb2004 dl replace dead thread if no others left
++ 23jun2004 dl fix shutdownAfterProcessingCurrentlyQueuedTasks
+ */
+
+ package EDU.oswego.cs.dl.util.concurrent;
+ import java.util.*;
+
+@@ -589,15 +590,27 @@
+ * Terminate threads after processing all elements currently in
+ * queue. Any tasks entered after this point will be handled by the
+ * given BlockedExecutionHandler. A shut down pool cannot be
+ * restarted.
+ **/
+- public synchronized void shutdownAfterProcessingCurrentlyQueuedTasks(BlockedExecutionHandler handler) {
+- setBlockedExecutionHandler(handler);
+- shutdown_ = true;
+- if (poolSize_ == 0) // disable new thread construction when idle
+- minimumPoolSize_ = maximumPoolSize_ = 0;
++ public void shutdownAfterProcessingCurrentlyQueuedTasks(BlockedExecutionHandler handler) {
++ synchronized(this) {
++ setBlockedExecutionHandler(handler);
++ shutdown_ = true;
++ if (poolSize_ == 0) // disable new thread construction when idle
++ minimumPoolSize_ = maximumPoolSize_ = 0;
++ }
++ // Try to add a final task to interrupt remaining threads waiting
++ // on handoff that will never otherwise get new tasks. If the
++ // offer fails, no threads such could be waiting
++ try {
++ Runnable r = new Runnable() { public void run() { interruptAll(); }};
++ handOff_.offer(r, 0);
++ }
++ catch(InterruptedException ie) {
++ Thread.currentThread().interrupt();
++ }
+ }
+
+ /**
+ * Return true if a shutDown method has succeeded in terminating all
+ * threads.
Added: oswego-concurrent/1.3.4-jboss/src/README.txt
===================================================================
--- oswego-concurrent/1.3.4-jboss/src/README.txt (rev 0)
+++ oswego-concurrent/1.3.4-jboss/src/README.txt 2007-09-11 13:10:22 UTC (rev 1264)
@@ -0,0 +1,9 @@
+This is the latest version of oswego concurrent
+compiled with jdk1.4
+
+The concurrent.zip contains the 1.3.4 source.
+
+The patches enable debug for the generated code
+and apply the unreleased fixes to
+ConcurrentHashMap and PooledExecutor mentioned here:
+http://g.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html
Added: oswego-concurrent/1.3.4-jboss/src/concurrent-build.patch
===================================================================
--- oswego-concurrent/1.3.4-jboss/src/concurrent-build.patch (rev 0)
+++ oswego-concurrent/1.3.4-jboss/src/concurrent-build.patch 2007-09-11 13:10:22 UTC (rev 1264)
@@ -0,0 +1,19 @@
+*** build.xml.orig 2007-03-23 13:38:19.000000000 -0400
+--- build.xml 2007-03-23 13:39:30.000000000 -0400
+***************
+*** 42,48 ****
+ </target>
+
+ <target name="compile" depends="setup.packages">
+! <javac srcdir="src" destdir="build" optimize="true"/>
+ </target>
+
+ <target name="dist" depends="compile">
+--- 42,48 ----
+ </target>
+
+ <target name="compile" depends="setup.packages">
+! <javac srcdir="src" destdir="build" debug="on" optimize="true"/>
+ </target>
+
+ <target name="dist" depends="compile">
Added: oswego-concurrent/1.3.4-jboss/src/concurrent.zip
===================================================================
(Binary files differ)
Property changes on: oswego-concurrent/1.3.4-jboss/src/concurrent.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
More information about the jboss-cvs-commits
mailing list