[jboss-cvs] JBossCache/src/org/jboss/cache ...
Manik Surtani
msurtani at jboss.com
Thu Feb 8 08:26:48 EST 2007
User: msurtani
Date: 07/02/08 08:26:46
Modified: src/org/jboss/cache CacheListener.java
Log:
Better Javadoc about concurrency
Revision Changes Path
1.9 +4 -0 JBossCache/src/org/jboss/cache/CacheListener.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheListener.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/CacheListener.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- CacheListener.java 19 Jan 2007 14:47:40 -0000 1.8
+++ CacheListener.java 8 Feb 2007 13:26:45 -0000 1.9
@@ -21,6 +21,10 @@
* the listener callback completes. It is therefore a good idea to use the listener to be notified of an event but to perform any
* long running tasks in a separate thread so as not to block the original caller.
* <p/>
+ * In addition, any locks acquired for the operation being performed will still be held for the callback. This needs to be kep in mind
+ * as locks may be held longer than necessary or intended to. See above paragraph on long-running tasks that should be run in a
+ * separate thread.
+ * <p/>
* Also important to note is that all data maps passed in to the listener methods are read-only defensive copies of the actual data
* stored in the cache. Therefore it is safe to assume that the collections are static snapshots. If changes to the cache data are
* to be triggered by such events, make calls on the cache directly rather than attempting to change the data maps.
More information about the jboss-cvs-commits
mailing list