Author: ilgrosso
Date: Tue Jul 3 14:21:45 2012
New Revision: 1356750
URL: http://svn.apache.org/viewvc?rev=1356750&view=rev
Log:
Utility methods for dealing with some CacheKey implementations
Modified:
cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/CompoundCacheKey.java
cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/ParameterCacheKey.java
Modified: cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/CompoundCacheKey.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/CompoundCacheKey.java?rev=1356750&r1=1356749&r2=1356750&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/CompoundCacheKey.java (original)
+++ cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/CompoundCacheKey.java Tue Jul 3 14:21:45 2012
@@ -18,6 +18,7 @@
*/
package org.apache.cocoon.pipeline.caching;
+import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
@@ -41,6 +42,10 @@ public class CompoundCacheKey extends Ab
this.cacheKeys.add(cacheKey);
}
+ public List<CacheKey> getCacheKeys() {
+ return Collections.unmodifiableList(this.cacheKeys);
+ }
+
@Override
public boolean equals(final Object obj) {
if (LOG.isDebugEnabled()) {
Modified: cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/ParameterCacheKey.java
URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/ParameterCacheKey.java?rev=1356750&r1=1356749&r2=1356750&view=diff
==============================================================================
--- cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/ParameterCacheKey.java (original)
+++ cocoon/cocoon3/trunk/cocoon-pipeline/src/main/java/org/apache/cocoon/pipeline/caching/ParameterCacheKey.java Tue Jul 3 14:21:45 2012
@@ -48,7 +48,7 @@ public class ParameterCacheKey extends A
/**
* Build an instance only when parameter names are safe in Sitemap context.
- *
+ *
* @param parameters to be considered for caching
* @return a Sitemap-safe instance
*/
@@ -107,6 +107,10 @@ public class ParameterCacheKey extends A
this.parameters.put(name, value);
}
+ public Map<String, String> getParameters() {
+ return Collections.unmodifiableMap(parameters);
+ }
+
/**
* {@inheritDoc}
*
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.