cziegeler 02/05/28 04:54:46
Modified: src/java/org/apache/cocoon/caching ComponentCacheKey.java
PipelineCacheKey.java
Log:
Added toString() method for the FilesystemStore :(
Revision Changes Path
1.9 +13 -1
xml-cocoon2/src/java/org/apache/cocoon/caching/ComponentCacheKey.java
Index: ComponentCacheKey.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/caching/ComponentCacheKey.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ComponentCacheKey.java 28 May 2002 10:51:31 -0000 1.8
+++ ComponentCacheKey.java 28 May 2002 11:54:46 -0000 1.9
@@ -61,7 +61,7 @@
* is unique inside the components space.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Id: ComponentCacheKey.java,v 1.8 2002/05/28 10:51:31 cziegeler Exp
$
+ * @version CVS $Id: ComponentCacheKey.java,v 1.9 2002/05/28 11:54:46 cziegeler Exp
$
*/
public final class ComponentCacheKey
implements Serializable {
@@ -117,5 +117,17 @@
(this.key.hashCode() << 6);
}
return this.hashCode;
+ }
+
+ private String toString;
+ /**
+ * toString
+ * The FilesystemStore uses toString!
+ */
+ public String toString() {
+ if (this.toString == null) {
+ toString = "CCK:" + this.type + this.identifier + " - " +
this.key.toString();
+ }
+ return toString;
}
}
1.11 +22 -1
xml-cocoon2/src/java/org/apache/cocoon/caching/PipelineCacheKey.java
Index: PipelineCacheKey.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/caching/PipelineCacheKey.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- PipelineCacheKey.java 28 May 2002 10:51:31 -0000 1.10
+++ PipelineCacheKey.java 28 May 2002 11:54:46 -0000 1.11
@@ -58,7 +58,7 @@
* or more {@link ComponentCacheKey}s.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Id: PipelineCacheKey.java,v 1.10 2002/05/28 10:51:31 cziegeler Exp
$
+ * @version CVS $Id: PipelineCacheKey.java,v 1.11 2002/05/28 11:54:46 cziegeler Exp
$
*/
public final class PipelineCacheKey
implements java.io.Serializable {
@@ -82,6 +82,7 @@
public void addKey(ComponentCacheKey key) {
this.keys.add(key);
this.hashCode = 0;
+ this.toString = null;
}
/**
@@ -90,6 +91,7 @@
public void removeLastKey() {
this.keys.remove(this.keys.size()-1);
this.hashCode = 0;
+ this.toString = null;
}
/**
@@ -142,4 +144,23 @@
}
return pck;
}
+
+ private String toString;
+ /**
+ * toString
+ * The FilesystemStore uses toString!
+ */
+ public String toString() {
+ if (this.toString == null) {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("PCK");
+ final int len = this.keys.size();
+ for(int i=0; i < len; i++) {
+ buffer.append(':').append(this.keys.get(i).toString());
+ }
+ this.toString = buffer.toString();
+ }
+ return toString;
+ }
+
}
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]