public SourceValidity getValidityForEventPipeline() {
if (this.cachedResponse != null) {
if (this.toCacheSourceValidities != null) {
// This means that the pipeline is valid based on the validities
// of the individual components
final AggregatedValidity validity = new AggregatedValidity();
for (int i=0; i < this.toCacheSourceValidities.length; i++) {
validity.add(this.toCacheSourceValidities[i]);
}
return validity;
}
else {
// This means that the pipeline is valid because it has not yet expired
return NOPValidity.SHARED_INSTANCE;
}
} else {
int vals = 0;
if ( null != this.toCacheKey
&& !this.cacheCompleteResponse
&& this.firstNotCacheableTransformerIndex == super.transformers.size()) {
vals = this.toCacheKey.size();
} else if ( null != this.fromCacheKey
&& !this.completeResponseIsCached
&& this.firstProcessedTransformerIndex == super.transformers.size()) {
vals = this.fromCacheKey.size();
}
if ( vals > 0 ) {
final AggregatedValidity validity = new AggregatedValidity();
for(int i=0; i < vals; i++) {
validity.add(this.getValidityForInternalPipeline(i));
//validity.add(new DeferredPipelineValidity(this, i));
}
return validity;
}
return null;