[jboss-cvs] JBossAS SVN: r71447 - projects/ejb3/branches/cluster-dev/ejb3-cache/src/main/java/org/jboss/ejb3/cache/spi.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Mar 30 11:00:55 EDT 2008


Author: bstansberry at jboss.com
Date: 2008-03-30 11:00:54 -0400 (Sun, 30 Mar 2008)
New Revision: 71447

Modified:
   projects/ejb3/branches/cluster-dev/ejb3-cache/src/main/java/org/jboss/ejb3/cache/spi/PassivatingBackingCacheEntry.java
Log:
[EJBTHREE-1026] Add javadoc

Modified: projects/ejb3/branches/cluster-dev/ejb3-cache/src/main/java/org/jboss/ejb3/cache/spi/PassivatingBackingCacheEntry.java
===================================================================
--- projects/ejb3/branches/cluster-dev/ejb3-cache/src/main/java/org/jboss/ejb3/cache/spi/PassivatingBackingCacheEntry.java	2008-03-30 14:53:25 UTC (rev 71446)
+++ projects/ejb3/branches/cluster-dev/ejb3-cache/src/main/java/org/jboss/ejb3/cache/spi/PassivatingBackingCacheEntry.java	2008-03-30 15:00:54 UTC (rev 71447)
@@ -25,15 +25,35 @@
 import org.jboss.ejb3.cache.api.CacheItem;
 
 /**
+ * A {@link BackingCacheEntry} that can be passivated.
+ * 
  * @author Brian Stansberry
- *
  */
 public interface PassivatingBackingCacheEntry<T extends CacheItem> 
    extends BackingCacheEntry<T>
 {
+   /**
+    * Attempt to lock this item, failing promptly if the lock is already
+    * held by another thread. Has the same semantics as
+    * {@java.util.concurrent.ReentrantLock#tryLock()}.
+    * 
+    * @return <code>true</code> if the lock was acquired, <code>false</code>
+    *         otherwise
+    */
+   boolean tryLock();
    
-   boolean tryLock();
+   /**
+    * Lock this item, blocking until the lock is acquired. Has the same 
+    * semantics as {@java.util.concurrent.ReentrantLock#lockInterruptibly()},
+    * except that a <code>RuntimeException</code> will be thrown if the
+    * thread is interrupted instead of <code>InterruptedException</code>.
+    */
    void lock();
+   
+   /**
+    * Unlock this item. Has the same semantics as 
+    * {@java.util.concurrent.ReentrantLock#unlock()}.
+    */
    void unlock();
 
 }




More information about the jboss-cvs-commits mailing list