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 2003/01/25 13:33:02 UTC
cvs commit: jakarta-commons/collections/src/java/org/apache/commons/collections ReferenceMap.java
scolebourne 2003/01/25 04:33:02
Modified: collections/src/java/org/apache/commons/collections
ReferenceMap.java
Log:
Improved javadoc of purge method.
from Eduardo Francos, bug fix #14889
Revision Changes Path
1.8 +22 -26 jakarta-commons/collections/src/java/org/apache/commons/collections/ReferenceMap.java
Index: ReferenceMap.java
===================================================================
RCS file: /home/cvs/jakarta-commons/collections/src/java/org/apache/commons/collections/ReferenceMap.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ReferenceMap.java 12 Oct 2002 22:15:18 -0000 1.7
+++ ReferenceMap.java 25 Jan 2003 12:33:02 -0000 1.8
@@ -1,13 +1,10 @@
/*
* $Header$
- * $Revision$
- * $Date$
- *
* ====================================================================
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999-2001 The Apache Software Foundation. All rights
+ * Copyright (c) 1999-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -23,11 +20,11 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
+ * any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowlegement may appear in the software itself,
- * if and wherever such third-party acknowlegements normally appear.
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
@@ -36,7 +33,7 @@
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
- * permission of the Apache Group.
+ * permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
@@ -60,7 +57,6 @@
*/
package org.apache.commons.collections;
-
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
@@ -80,7 +76,6 @@
import java.util.NoSuchElementException;
import java.util.Set;
-
/**
* Hashtable-based {@link Map} implementation that allows
* mappings to be removed by the garbage collector.<P>
@@ -118,10 +113,12 @@
* can use {@link java.util.Collections#synchronizedMap} to
* provide synchronized access to a <Code>ReferenceMap</Code>.
*
- * @author Paul Jack
- * @version $Id$
- * @since 2.1
- * @see java.lang.ref.Reference
+ * @see java.lang.ref.Reference
+ *
+ * @since Commons Collections 2.1
+ * @version $Revision$ $Date$
+ *
+ * @author Paul Jack
*/
public class ReferenceMap extends AbstractMap {
@@ -429,17 +426,16 @@
/**
- * Purges stale mappings from this map.<P>
- *
- * Ordinarily, stale mappings are only removed during
- * a write operation; typically a write operation will
- * occur often enough that you'll never need to manually
- * invoke this method.<P>
- *
- * Note that this method is not synchronized! Special
- * care must be taken if, for instance, you want stale
- * mappings to be removed on a periodic basis by some
- * background thread.
+ * Purges stale mappings from this map.
+ * <p>
+ * Ordinarily, stale mappings are only removed during
+ * a write operation, although this method is called for both
+ * read and write operations to maintain a consistent state.
+ * <p>
+ * Note that this method is not synchronized! Special
+ * care must be taken if, for instance, you want stale
+ * mappings to be removed on a periodic basis by some
+ * background thread.
*/
private void purge() {
Reference ref = queue.poll();
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>