asmuts 02/01/17 14:45:52
Modified: src/java/org/apache/stratum/jcs/engine/control Cache.java
Log:
added some comments
removed some commented code
Revision Changes Path
1.6 +10 -21
jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/engine/control/Cache.java
Index: Cache.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/jcs/engine/control/Cache.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Cache.java 17 Jan 2002 07:03:48 -0000 1.5
+++ Cache.java 17 Jan 2002 22:45:52 -0000 1.6
@@ -95,6 +95,10 @@
public class Cache implements ICacheHub, ICache, ICompositeCache, Serializable
{
+ /**
+ * 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 debugcmd = false;//true;
private final static boolean debugR = false;//true;
@@ -112,22 +116,21 @@
final String cacheName;
- // Region Elemental Attributes
/**
- * Description of the Field
+ * Region Elemental Attributes
*/
public Attributes attr;
- // Cache Attributes
+
/**
- * Description of the Field
+ * Cache Attributes
*/
public ICompositeCacheAttributes cacheAttr;
private String source_id = "org.apache.stratum.jcs.engine.control.Cache";
- // need to convert to log4j
+
/**
- * Description of the Field
+ * need to convert to log4j
*/
protected final Logger log;
@@ -218,8 +221,6 @@
{
log.error( e );
}
- //memCache.moveToMemory( ce );
- //moveToMemory( (CacheElement)ce );
return;
}
@@ -292,10 +293,6 @@
p( "updateCaches(key,val,attr) > ICache.INCLUDE_REMOTE_CACHE= " +
ICache.INCLUDE_REMOTE_CACHE + " key = " + key );
}
-// CacheElement ce = new CacheElement( cacheName, key, val );
-// ce.setAttributes( attr );
-// updateCaches( ce, ICache.INCLUDE_REMOTE_CACHE );
-
updateCaches( key, val, attr, ICache.INCLUDE_REMOTE_CACHE );
}
@@ -482,7 +479,7 @@
/**
* ICacheHub method
*
- *@param ce Description of the Parameter
+ *@param ce The CacheElement
*/
public synchronized void spoolToDisk( ICacheElement ce )
{
@@ -576,7 +573,6 @@
p( "in cache get(key,container)" );
}
- //MemoryElementDescriptor me = null;
ICacheElement ce = null;
boolean found = false;
@@ -599,8 +595,6 @@
for ( int i = 0; i < auxCaches.length; i++ )
{
- //Serializable val = null;
- //p( "aux["+i+"]" );
ICache aux = auxCaches[i];
if ( aux != null )
@@ -615,7 +609,6 @@
try
{
- //val = aux.get(key);
ce = ( ICacheElement ) aux.get( key, true );
}
catch ( IOException ex )
@@ -629,7 +622,6 @@
p( "ce = " + ce );
}
- //if (val != null) {
if ( ce != null )
{
found = true;
@@ -641,17 +633,14 @@
p( cacheName + " -- AUX[" + i + "]-HIT for " + key
);
p( "ce.getKey() = " + ce.getKey() );
p( "ce.getVal() = " + ce.getVal() );
- //p( "ce.getAttributes() = " + ce.getAttributes() );
}
if ( log.logLevel >= log.DEBUG )
{
log.debug( cacheName + " -- AUX[" + i + "]-HIT for
" + key );
log.debug( "ce.getKey() = " + ce.getKey() );
log.debug( "ce.getVal() = " + ce.getVal() );
- //log.debug( "ce.getAttributes() = " +
ce.getAttributes() );
}
- //memCache.moveToMemory( ce );
memCache.update( ce );
break;
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>