org.orbeon.oxf.processor
Class ProcessorImpl.DigestTransformerOutputImpl

java.lang.Object
  extended byorg.orbeon.oxf.processor.ProcessorImpl.ProcessorOutputImpl
      extended byorg.orbeon.oxf.processor.ProcessorImpl.CacheableTransformerOutputImpl
          extended byorg.orbeon.oxf.processor.ProcessorImpl.DigestTransformerOutputImpl
All Implemented Interfaces:
org.orbeon.oxf.cache.Cacheable, org.orbeon.oxf.processor.ProcessorInputOutput, org.orbeon.oxf.processor.ProcessorOutput, org.orbeon.oxf.processor.ProcessorReader
Enclosing class:
ProcessorImpl

public abstract class ProcessorImpl.DigestTransformerOutputImpl
extends ProcessorImpl.CacheableTransformerOutputImpl

Implementation of a caching transformer output that assumes that an output simply depends on all the inputs plus optional local information that can be digested.


Constructor Summary
ProcessorImpl.DigestTransformerOutputImpl(Class clazz, String name)
           
 
Method Summary
protected abstract  byte[] computeDigest(PipelineContext pipelineContext, ProcessorImpl.DigestState digestState)
          Compute a digest of the internal document on which the output depends.
protected abstract  boolean fillOutState(PipelineContext pipelineContext, ProcessorImpl.DigestState digestState)
          Fill-out user data into the state, if needed.
protected  ProcessorImpl.DigestState getFilledOutState(PipelineContext pipelineContext)
           
protected  org.orbeon.oxf.cache.CacheKey getLocalKey(PipelineContext pipelineContext)
           
protected  Object getLocalValidity(PipelineContext pipelineContext)
           
protected  boolean supportsLocalKeyValidity()
          Processor outputs that use the local key/validity feature must override this method and return true.
 
Methods inherited from class org.orbeon.oxf.processor.ProcessorImpl.CacheableTransformerOutputImpl
getKeyImpl, getValidityImpl
 
Methods inherited from class org.orbeon.oxf.processor.ProcessorImpl.ProcessorOutputImpl
getDebugMessage, getId, getInput, getKey, getKeyValidityImpl, getLocationData, getName, getProcessorClass, getSchema, getValidity, read, readImpl, setBreakpointKey, setDebug, setId, setInput, setLocationData, setSchema
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessorImpl.DigestTransformerOutputImpl

public ProcessorImpl.DigestTransformerOutputImpl(Class clazz,
                                                 String name)
Method Detail

supportsLocalKeyValidity

protected final boolean supportsLocalKeyValidity()
Description copied from class: ProcessorImpl.CacheableTransformerOutputImpl
Processor outputs that use the local key/validity feature must override this method and return true.

Overrides:
supportsLocalKeyValidity in class ProcessorImpl.CacheableTransformerOutputImpl

getLocalKey

protected final org.orbeon.oxf.cache.CacheKey getLocalKey(PipelineContext pipelineContext)
Overrides:
getLocalKey in class ProcessorImpl.CacheableTransformerOutputImpl

getLocalValidity

protected final Object getLocalValidity(PipelineContext pipelineContext)
Overrides:
getLocalValidity in class ProcessorImpl.CacheableTransformerOutputImpl

fillOutState

protected abstract boolean fillOutState(PipelineContext pipelineContext,
                                        ProcessorImpl.DigestState digestState)
Fill-out user data into the state, if needed. Return caching information.

Parameters:
pipelineContext - the current PipelineContext
digestState - state set during processor start() or reset()
Returns:
false if private information is known that requires disabling caching, true otherwise

computeDigest

protected abstract byte[] computeDigest(PipelineContext pipelineContext,
                                        ProcessorImpl.DigestState digestState)
Compute a digest of the internal document on which the output depends.

Parameters:
digestState - state set during processor start() or reset()
Returns:
the digest

getFilledOutState

protected final ProcessorImpl.DigestState getFilledOutState(PipelineContext pipelineContext)