[jboss-cvs] JBossCache/src/org/jboss/cache ...
Manik Surtani
msurtani at jboss.com
Fri Jan 19 07:05:41 EST 2007
User: msurtani
Date: 07/01/19 07:05:41
Modified: src/org/jboss/cache DefaultCacheFactory.java
CacheFactory.java RegionImpl.java
RegionManager.java Region.java
Log:
Javadoc enhancements
Revision Changes Path
1.3 +2 -2 JBossCache/src/org/jboss/cache/DefaultCacheFactory.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: DefaultCacheFactory.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/DefaultCacheFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- DefaultCacheFactory.java 19 Jan 2007 02:04:10 -0000 1.2
+++ DefaultCacheFactory.java 19 Jan 2007 12:05:41 -0000 1.3
@@ -13,7 +13,7 @@
import org.jboss.cache.factories.XmlConfigurationParser;
/**
- * Default (singleton) implementation of the Cache Factory interface.
+ * Default (singleton) implementation of the {@link org.jboss.cache.CacheFactory} interface.
* Use {@link #getInstance()} to obtain an instance.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
@@ -32,7 +32,7 @@
}
/**
- * Returns a single instance of this class.
+ * Returns a singleton instance of this class.
*/
public static CacheFactory getInstance()
{
1.4 +11 -4 JBossCache/src/org/jboss/cache/CacheFactory.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheFactory.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/CacheFactory.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- CacheFactory.java 19 Jan 2007 02:04:10 -0000 1.3
+++ CacheFactory.java 19 Jan 2007 12:05:41 -0000 1.4
@@ -17,14 +17,21 @@
* <pre>
* CacheFactory factory = DefaultCacheFactory.getInstance();
* Cache cache = factory.createCache("replSync-service.xml"); // expects this file to be in classpath
- * <p/>
* cache.stop();
* </pre>
+ * Factory methods provide options for creating a cache using
+ * <ul>
+ * <li>default configuration settings</li>
+ * <li>an XML file containing the configuration</li>
+ * <li>a constructed and populated {@link org.jboss.cache.config.Configuration} object</li>
+ * </ul>
+ * In addition, methods provide anadditional option to create and return a cache without starting it.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
* @see org.jboss.cache.Cache
+ * @see org.jboss.cache.DefaultCacheFactory
+ * @see org.jboss.cache.pojo.PojoCacheFactory
* @since 2.0.0
- * @see DefaultCacheFactory
*/
public interface CacheFactory
{
1.20 +0 -4 JBossCache/src/org/jboss/cache/RegionImpl.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: RegionImpl.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/RegionImpl.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- RegionImpl.java 18 Jan 2007 16:55:19 -0000 1.19
+++ RegionImpl.java 19 Jan 2007 12:05:41 -0000 1.20
@@ -150,10 +150,6 @@
}
}
- /**
- * Returns and removes the last event from event queue.
- * If no more events exists, returns null. May also return null if interrupted.
- */
public EvictedEventNode takeLastEventNode()
{
try
1.26 +13 -8 JBossCache/src/org/jboss/cache/RegionManager.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: RegionManager.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/RegionManager.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- RegionManager.java 19 Jan 2007 02:04:11 -0000 1.25
+++ RegionManager.java 19 Jan 2007 12:05:41 -0000 1.26
@@ -72,7 +72,7 @@
}
/**
- * Returns true if replication is by default inactive.
+ * Returns true if replication is by default inactive for new {@link Region}s.
*/
public boolean isDefaultInactive()
{
@@ -80,7 +80,7 @@
}
/**
- * Sets if replication is by default inactive.
+ * Sets if replication for new {@link Region}s is by default inactive.
*/
public void setDefaultInactive(boolean defaultInactive)
{
@@ -88,10 +88,10 @@
}
/**
- * Helper utility that checks for a classloader registered for the
- * given Fqn, and if found sets it as the TCCL. If the given Fqn is
+ * Helper utility that checks for a {@link ClassLoader} registered for the
+ * given {@link Fqn}, and if found sets it as the TCCL. If the given Fqn is
* under the _BUDDY_BACKUP_ region, the equivalent region in the main
- * cache is used to find the classloader.
+ * cache is used to find the {@link ClassLoader}.
*
* @param fqn Fqn pointing to a region for which a special classloader
* may have been registered.
@@ -130,7 +130,8 @@
}
/**
- * Returns a region by FQN, creating it optionally if absent.
+ * Returns a region by {@link Fqn}, creating it optionally if absent. If the region does not exist and <tt>createIfAbsent</tt>
+ * is <tt>false</tt>, a parent region which may apply to the {@link Fqn} is sought.
*/
public Region getRegion(Fqn fqn, boolean createIfAbsent)
{
@@ -138,7 +139,10 @@
}
/**
- * Returns a region by FQN, with a type, creating it optionally if absent.
+ * An overloaded form of {@link #getRegion(Fqn,boolean)} that takes an additional {@link org.jboss.cache.Region.Type}
+ * parameter to force regions of a specific type.
+ *
+ * @see org.jboss.cache.Region.Type
*/
public Region getRegion(Fqn fqn, Region.Type type, boolean createIfAbsent)
{
@@ -647,6 +651,7 @@
/**
* Returns true if the region exists
+ *
* @param fqn FQN of the region
* @return true if the region exists
*/
1.13 +26 -23 JBossCache/src/org/jboss/cache/Region.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Region.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/Region.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- Region.java 19 Jan 2007 02:04:11 -0000 1.12
+++ Region.java 19 Jan 2007 12:05:41 -0000 1.13
@@ -13,12 +13,13 @@
import org.jboss.cache.eviction.LRUPolicy;
/**
- * Defines characteristics such as class loading, replication, and eviction
- * of Nodes belonging to a region in a {@link Cache}.
- * A region is described by an {@link #getFqn() FQN} relative to the root of the cache.
- * All nodes and child nodes of this FQN belong to this region.
+ * Defines characteristics such as class loading and eviction of {@link org.jboss.cache.Node}s belonging to a Region in a {@link Cache}.
+ * A Region is described by an {@link #getFqn() Fqn} relative to the root of the cache.
+ * All nodes and child nodes of this Fqn belong to this region.
*
* @author <a href="mailto:manik at jboss.org">Manik Surtani (manik at jboss.org)</a>
+ * @see org.jboss.cache.RegionManager
+ * @since 2.0.0
*/
public interface Region extends Comparable<Region>
{
@@ -115,35 +116,36 @@
void resetEvictionQueues();
/**
- * Returns the size of the node event queue.
+ * Returns the size of the node event queue, used by the eviction thread.
*
* @return number of events
*/
int nodeEventQueueSize();
/**
- * Returns the most recent node event added to the event queue by
+ * Returns the most recent {@link org.jboss.cache.eviction.EvictedEventNode} added to the event queue by
* {@link #putNodeEvent(EvictedEventNode)}.
*
- * @return the last evicted event node, or null if no more events exist
+ * @return the last {@link org.jboss.cache.eviction.EvictedEventNode}, or null if no more events exist
*/
EvictedEventNode takeLastEventNode();
/**
- * Adds an evicted node event to the internal queue.
+ * Adds an {@link org.jboss.cache.eviction.EvictedEventNode} to the internal queue for processing
+ * by the eviction thread.
*
* @param event event to add
*/
void putNodeEvent(EvictedEventNode event);
/**
- * Marks a node as currently in use, by adding an event to the eviction queue.
+ * Marks a {@link org.jboss.cache.Node} as currently in use, by adding an event to the eviction queue.
* If there is an {@link EvictionPolicy} associated with this region, and
- * it respects this event ({@link LRUPolicy} does), then the node will not
+ * it respects this event (e.g., {@link LRUPolicy} does), then the {@link org.jboss.cache.Node} will not
* be evicted until {@link #unmarkNodeCurrentlyInUse(Fqn)} is invoked.
* <p/>
* This mechanism can be used to prevent eviction of data that the application
- * is currently using, in the absence of any locks on the node where the
+ * is currently using, in the absence of any locks on the {@link org.jboss.cache.Node} where the
* data is stored.
*
* @param fqn Fqn of the node.
@@ -160,8 +162,9 @@
void unmarkNodeCurrentlyInUse(Fqn fqn);
/**
- * Returns the fully-qualified name of this region.
- * @return the FQN
+ * Returns the {@link org.jboss.cache.Fqn} of this region.
+ *
+ * @return the Fqn
*/
Fqn getFqn();
More information about the jboss-cvs-commits
mailing list