asmuts 02/01/17 14:28:56
Modified: src/java/org/apache/stratum/jcs/engine/group GroupCache.java
Log:
added some comments
Revision Changes Path
1.7 +48 -36
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/engine/group/GroupCache.java
Index: GroupCache.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/engine/group/GroupCache.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- GroupCache.java 17 Jan 2002 07:03:48 -0000 1.6
+++ GroupCache.java 17 Jan 2002 22:28:56 -0000 1.7
@@ -96,12 +96,21 @@
public class GroupCache extends Cache implements ICompositeCache
{
//////////////// debug MUST BE SET TO false in production! ///////////////////
-
+ /**
+ * Development debugging parameters. Calls should be removed by the compiler.
+ * TODO: limit and replace with a less intrusive logging at a later stage.
+ */
private final static boolean debug = false;//true;
private final static boolean debuggan = false;//true;
+ /**
+ * Manages locking for group item manipulation.
+ */
private ReadWriteLockManager locker = GroupRWLockManager.getInstance();
+ /**
+ * Rarely used class identity. Mainly for debugging.
+ */
private String source_id = "org.apache.stratum.jcs.engine.group.GroupCache";
/**
@@ -174,8 +183,8 @@
* Overrides to provide read lock on both GroupAttrName read-operation and
* String read-operation.
*
- *@param key Description of the Parameter
- *@return Description of the Return Value
+ *@param key The key for the element
+ *@return Returns element from the cache if found, else null
*/
public Serializable get( Serializable key )
{
@@ -184,11 +193,11 @@
/**
- * Description of the Method
+ * Gets an element fromt he cache
*
- *@param key Description of the Parameter
- *@param container Description of the Parameter
- *@return Description of the Return Value
+ *@param key The key for the element
+ *@param container Should it return the CacheElement wrapper
+ *@return Returns element from the cache if found, else null
*/
public Serializable get( Serializable key, boolean container )
{
@@ -197,13 +206,13 @@
/**
- * Description of the Method
+ * Gets an element fromt he cache
*
- *@param key Description of the Parameter
- *@param container Description of the Parameter
- *@param invocation Description of the Parameter
- *@return Description of the Return Value
- */
+ *@param key The key for the element
+ *@param container Should it return the CacheElement wrapper
+ *@param invocation Is the originating method call from a local source
+ *@return Returns element from the cache if found, else null
+ */
public Serializable get( Serializable key, boolean container, boolean
invocation )
{
@@ -237,8 +246,8 @@
/**
* Places a read lock on the group id for a GroupAttrName get-operation.
*
- *@param key Description of the Parameter
- *@param container Description of the Parameter
+ *@param key The key for the element
+ *@param container Should it return the CacheElement wrapper
*@return The gAN value
*/
public Serializable getGAN( GroupAttrName key, boolean container )
@@ -250,9 +259,9 @@
/**
* Gets the gAN attribute of the GroupCache object
*
- *@param key Description of the Parameter
- *@param container Description of the Parameter
- *@param invocation Description of the Parameter
+ *@param key The key for the element
+ *@param container Should it return the CacheElement wrapper
+ *@param invocation Is the originating method call from a local source
*@return The gAN value
*/
public Serializable getGAN( GroupAttrName key, boolean container, boolean
invocation )
@@ -286,8 +295,8 @@
/**
* Places a read lock on the key for a GroupId get-operation.
*
- *@param gid Description of the Parameter
- *@param container Description of the Parameter
+ *@param gid The group id
+ *@param container Should the cache element wrapper be returned
*@return The gI value
*/
// get list from remote if it isn't present
@@ -302,7 +311,7 @@
*
*@param gid Description of the Parameter
*@param container Description of the Parameter
- *@param invocation Description of the Parameter
+ *@param invocation Is the originating method call from a local source
*@return The gI value
*/
public Serializable getGI( GroupId gid, boolean container, boolean invocation )
@@ -341,9 +350,9 @@
/////////////////////////////////////////////
/**
- * Description of the Method
+ * Internally used read lock for group modification.
*
- *@param id Description of the Parameter
+ *@param id What name to lock on.
*/
private void readLock( String id )
{
@@ -372,9 +381,9 @@
//////////////////////////////////////
/**
- * Description of the Method
+ * Internally used write lock for group modification.
*
- *@param id Description of the Parameter
+ *@param id What name to lock on.
*/
private void writeLock( String id )
{
@@ -404,9 +413,9 @@
/**
* Overrides to special handling for GroupAttrName put-operation.
*
- *@param key Description of the Parameter
- *@param val Description of the Parameter
- *@param attr Description of the Parameter
+ *@param key Retrieval key for the element to cache
+ *@param val The Object to cache
+ *@param attr The element attributes
*@exception IOException Description of the Exception
*/
public void put( Serializable key, Serializable val, Attributes attr )
@@ -542,10 +551,10 @@
* Description of the Method
*
*@param ce Description of the Parameter
- *@param localInvocation Description of the Parameter
+ *@param invocation Is the originating method call from a local source
*@exception IOException Description of the Exception
*/
- // PROBLEM CACHE HAS THE SAME METHOD AND THE 2nd arg is updaDateRemote
+ // PROBLEM CACHE HAS THE SAME METHOD AND THE 2nd arg is updateRemote
public synchronized void update( ICacheElement ce, boolean invocation )
throws IOException
{
@@ -656,12 +665,12 @@
/**
- * Description of the Method
+ * Put an element into a group.
*
*@param key Description of the Parameter
*@param val Description of the Parameter
*@param attrE Description of the Parameter
- *@param updateRemote Description of the Parameter
+ *@param invocation Is the originating method call from a local source
*@exception IOException Description of the Exception
*/
//public void putGAN( GroupAttrName key, Serializable val, Attributes attrE,
boolean updateRemote )
@@ -821,7 +830,7 @@
* overriding. removeGAN could be called remove
*
*@param key Description of the Parameter
- *@param invocation Description of the Parameter
+ *@param invocation Is the originating method call from a local source
*@return Description of the Return Value
*/
public boolean remove( Serializable key, boolean invocation )
@@ -887,7 +896,7 @@
* condition.
*
*@param key Description of the Parameter
- *@param invokation Description of the Parameter
+ *@param invocation Is the originating method call from a local source
*@return Description of the Return Value
*/
public boolean removeGAN( GroupAttrName key, boolean invocation )
@@ -1121,7 +1130,7 @@
/**
* Gets the elementAttributes attribute of the GroupCache object
*
- *@param key Description of the Parameter
+ *@param key Retrieval value for item.
*@return The elementAttributes value
*@exception CacheException Description of the Exception
*@exception IOException Description of the Exception
@@ -1140,7 +1149,10 @@
////////////////////////////////////////
/**
- * Description of the Method
+ * Easy method for printing to system out for
+ * development debugging. All of these should be
+ * removed by the compiler since they are in
+ * if blocks controlled by a static final variable.
*
*@param s Description of the Parameter
*/
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>