You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@cocoon.apache.org by da...@cocoon.zones.apache.org on 2007/07/02 22:01:31 UTC
[DAISY] Updated: CacheableProcessingComponent Contracts
A document has been updated:
http://cocoon.zones.apache.org/daisy/documentation/675.html
Document ID: 675
Branch: main
Language: default
Name: CacheableProcessingComponent Contracts (unchanged)
Document Type: Cocoon Document (unchanged)
Updated on: 7/2/07 8:01:09 PM
Updated by: Reinhard Pötz
A new version has been created, state: publish
Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name: (unchanged)
Size: 8871 bytes (previous version: 8826 bytes)
Content diff:
(31 equal lines skipped)
method).</li>
<li>It must be Immutable--the key is used as a lookup value.</li>
<li>It must be Unique within the space of the component (i.e. the key "1" for
--- MyCacheableComponent must be for the same resource every time, but we don't have
--- to worry about the key "1" for YourCacheableComponent).</li>
+++ <tt>MyCacheableComponent </tt>must be for the same resource every time, but we
+++ don't have to worry about the key "1" for YourCacheableComponent).</li>
<li>The <tt>equals()</tt> and <tt><tt><tt>hashCode()</tt></tt></tt> methods must
be consistent (i.e. if two keys are equal, the hashCode must also be equal).
</li>
(23 equal lines skipped)
<p>The SourceValidity interface provides two <tt>isValid()</tt> methods, which
are used to check the validity of a source. The first call is to the version
without parameters, which the SourceValidity will return
--- <tt>SourceValidity.VALID</tt>,
--- <tt><tt><tt>SourceValidity.UNKNOWN</tt></tt></tt>, or
+++ <tt>SourceValidity.VALID</tt>, <tt>SourceValidity.UNKNOWN</tt>, or
<tt>SourceValidity.INVALID</tt>. If the first call responds with
<tt>SourceValidity.UNKNOWN</tt>, then a new SourceValidity object is obtained
from the CacheableProcessingComponent and that is passed into the
(11 equal lines skipped)
component are (in the order of commonality):</p>
<ul>
--- <li>NOPValidity--always valid</li>
--- <li>TimeStampValidity--valid until a newer timestamp is found
+++ <li><tt>NOPValidity</tt>--always valid</li>
+++ <li><tt>TimeStampValidity</tt>--valid until a newer timestamp is found
(System.currentTimeMillis())</li>
--- <li>ExpiresValidity--valid until the expiration date is reached
+++ <li><tt>ExpiresValidity</tt>--valid until the expiration date is reached
(System.currentTimeMillis() + time)</li>
--- <li>FileTimestampValidity--valid until the referenced file changes</li>
--- <li>AggregatedValidity--a compound validity object that is valid as long as all
--- the encapsulated validity objects are valid</li>
--- <li>DeferredAggregatedValidity--a compound validity object that only gets
--- validity objects if they are needed.</li>
+++ <li><tt>FileTimestampValidity</tt>--valid until the referenced file changes</li>
+++ <li><tt>AggregatedValidity</tt>--a compound validity object that is valid as
+++ long as all the encapsulated validity objects are valid</li>
+++ <li><tt>DeferredAggregatedValidity</tt>--a compound validity object that only
+++ gets validity objects if they are needed.</li>
</ul>
<h3>NOPValidity</h3>
(100 equal lines skipped)