You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sc...@apache.org on 2004/06/02 01:05:49 UTC
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections/set SynchronizedSet.java SynchronizedSortedSet.java
scolebourne 2004/06/01 16:05:49
Modified: collections/src/java/org/apache/commons/collections/bag
SynchronizedSortedBag.java SynchronizedBag.java
collections/src/java/org/apache/commons/collections/buffer
BlockingBuffer.java SynchronizedBuffer.java
collections/src/java/org/apache/commons/collections/list
SynchronizedList.java
collections/src/java/org/apache/commons/collections/collection
SynchronizedCollection.java
collections/src/java/org/apache/commons/collections/set
SynchronizedSet.java SynchronizedSortedSet.java
Log:
Make synchronized classes serializable
Revision Changes Path
1.7 +3 -1 jakarta-commons/collections/src/java/org/apache/commons/collections/bag/SynchronizedSortedBag.java
Index: SynchronizedSortedBag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/bag/SynchronizedSortedBag.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- SynchronizedSortedBag.java 15 May 2004 12:27:04 -0000 1.6
+++ SynchronizedSortedBag.java 1 Jun 2004 23:05:48 -0000 1.7
@@ -26,6 +26,8 @@
* <p>
* Methods are synchronized, then forwarded to the decorated bag.
* Iterators must be separately synchronized around the loop.
+ * <p>
+ * This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision$ $Date$
1.7 +3 -1 jakarta-commons/collections/src/java/org/apache/commons/collections/bag/SynchronizedBag.java
Index: SynchronizedBag.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/bag/SynchronizedBag.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- SynchronizedBag.java 15 May 2004 12:27:04 -0000 1.6
+++ SynchronizedBag.java 1 Jun 2004 23:05:48 -0000 1.7
@@ -27,6 +27,8 @@
* <p>
* Methods are synchronized, then forwarded to the decorated bag.
* Iterators must be separately synchronized around the loop.
+ * <p>
+ * This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision$ $Date$
1.6 +3 -1 jakarta-commons/collections/src/java/org/apache/commons/collections/buffer/BlockingBuffer.java
Index: BlockingBuffer.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/buffer/BlockingBuffer.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- BlockingBuffer.java 16 May 2004 10:45:52 -0000 1.5
+++ BlockingBuffer.java 1 Jun 2004 23:05:49 -0000 1.6
@@ -33,6 +33,8 @@
* There is no guarantee that concurrent blocked <code>get</code> or
* <code>remove</code> requests will be "unblocked" and receive data in the
* order that they arrive.
+ * <p>
+ * This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision$ $Date$
1.5 +3 -1 jakarta-commons/collections/src/java/org/apache/commons/collections/buffer/SynchronizedBuffer.java
Index: SynchronizedBuffer.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/buffer/SynchronizedBuffer.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SynchronizedBuffer.java 15 May 2004 12:33:23 -0000 1.4
+++ SynchronizedBuffer.java 1 Jun 2004 23:05:49 -0000 1.5
@@ -23,6 +23,8 @@
* for a multi-threaded environment.
* <p>
* Methods are synchronized, then forwarded to the decorated buffer.
+ * <p>
+ * This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision$ $Date$
1.4 +3 -1 jakarta-commons/collections/src/java/org/apache/commons/collections/list/SynchronizedList.java
Index: SynchronizedList.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/list/SynchronizedList.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SynchronizedList.java 18 Feb 2004 01:12:26 -0000 1.3
+++ SynchronizedList.java 1 Jun 2004 23:05:49 -0000 1.4
@@ -26,6 +26,8 @@
* for a multi-threaded environment.
* <p>
* Methods are synchronized, then forwarded to the decorated list.
+ * <p>
+ * This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision$ $Date$
1.6 +7 -2 jakarta-commons/collections/src/java/org/apache/commons/collections/collection/SynchronizedCollection.java
Index: SynchronizedCollection.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/collection/SynchronizedCollection.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SynchronizedCollection.java 15 May 2004 12:39:13 -0000 1.5
+++ SynchronizedCollection.java 1 Jun 2004 23:05:49 -0000 1.6
@@ -15,6 +15,7 @@
*/
package org.apache.commons.collections.collection;
+import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
@@ -29,14 +30,18 @@
* // do stuff with iterator
* }
* </pre>
+ * <p>
+ * This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision$ $Date$
*
* @author Stephen Colebourne
*/
-public class SynchronizedCollection implements Collection {
+public class SynchronizedCollection implements Collection, Serializable {
+ /** Serialization version */
+ private static final long serialVersionUID = 2412805092710877986L;
/** The collection to decorate */
protected final Collection collection;
/** The object to lock on, needed for List/SortedSet views */
1.4 +3 -1 jakarta-commons/collections/src/java/org/apache/commons/collections/set/SynchronizedSet.java
Index: SynchronizedSet.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/set/SynchronizedSet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SynchronizedSet.java 18 Feb 2004 01:14:27 -0000 1.3
+++ SynchronizedSet.java 1 Jun 2004 23:05:49 -0000 1.4
@@ -24,6 +24,8 @@
* multi-threaded environment.
* <p>
* Methods are synchronized, then forwarded to the decorated set.
+ * <p>
+ * This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision$ $Date$
1.4 +3 -1 jakarta-commons/collections/src/java/org/apache/commons/collections/set/SynchronizedSortedSet.java
Index: SynchronizedSortedSet.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/set/SynchronizedSortedSet.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SynchronizedSortedSet.java 18 Feb 2004 01:14:27 -0000 1.3
+++ SynchronizedSortedSet.java 1 Jun 2004 23:05:49 -0000 1.4
@@ -25,6 +25,8 @@
* for a multi-threaded environment.
* <p>
* Methods are synchronized, then forwarded to the decorated set.
+ * <p>
+ * This class is Serializable from Commons Collections 3.1.
*
* @since Commons Collections 3.0
* @version $Revision$ $Date$
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org