[jboss-cvs] JBossAS SVN: r87219 - projects/cluster/ha-server-cache-spi/trunk/src/main/java/org/jboss/ha/framework/server/spi.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Apr 13 21:20:26 EDT 2009


Author: bstansberry at jboss.com
Date: 2009-04-13 21:20:26 -0400 (Mon, 13 Apr 2009)
New Revision: 87219

Modified:
   projects/cluster/ha-server-cache-spi/trunk/src/main/java/org/jboss/ha/framework/server/spi/HAPartitionCacheHandler.java
Log:
Javadoc

Modified: projects/cluster/ha-server-cache-spi/trunk/src/main/java/org/jboss/ha/framework/server/spi/HAPartitionCacheHandler.java
===================================================================
--- projects/cluster/ha-server-cache-spi/trunk/src/main/java/org/jboss/ha/framework/server/spi/HAPartitionCacheHandler.java	2009-04-14 01:09:36 UTC (rev 87218)
+++ projects/cluster/ha-server-cache-spi/trunk/src/main/java/org/jboss/ha/framework/server/spi/HAPartitionCacheHandler.java	2009-04-14 01:20:26 UTC (rev 87219)
@@ -25,22 +25,63 @@
 import org.jgroups.ChannelFactory;
 
 /**
- * Handles basic lifecycle operations on HAPartition's cache without 
- * exposing the cache.
+ * Handles basic lifecycle operations on <code>HAPartition</code>'s cache without 
+ * exposing the cache and introducing a dependency on JBoss Cache. Purpose is
+ * to allow an <code>HAPartition</code> to obtain information about a cache's
+ * channel in order to allow it to create a channel with the same configuration.
+ * That is important when some services use both a cache and <code>HAPartition</code>
+ * and thus want compatible channels for both the cache and the partition.
+ * <p>
+ * Assumption is that an implementation of this interface would work with an 
+ * <code>org.jboss.cache.CacheManager</code> as a
+ * source of its cache, but an implemenation could work otherwise.
+ * </p>
  * 
  * @author Brian Stansberry
  */
 public interface HAPartitionCacheHandler
 {
+   /**
+    * Instructs this handler to acquire a reference to the cache.
+    * 
+    * @throws Exception
+    */
    void acquireCache() throws Exception;
    
+   /**
+    * Instructs this handler to start the cache previously obtained via
+    * {@link #acquireCache()}.
+    * 
+    * @throws Exception
+    */
    void startCache() throws Exception;
    
+   /**
+    * Instructs this handler to release any reference to the cache.
+    * 
+    * @throws Exception
+    */
    void releaseCache() throws Exception;
    
+   /**
+    * Gets the name of the cache's configuration.
+    * 
+    * @return the name of the cache configuration
+    */
    String getCacheConfigName();
    
+   /**
+    * Gets the name of cache's JGroups protocol stack configuration.
+    * 
+    * @return the name of the protocol stack configuration
+    */
    String getChannelStackName();   
    
+   /**
+    * Gets the {@link ChannelFactory} from which the cache obtains
+    * its <code>Channel</code>.
+    * 
+    * @return the channel factory.
+    */
    ChannelFactory getCacheChannelFactory();   
 }




More information about the jboss-cvs-commits mailing list