Package com.yahoo.application.container
Class DocumentProcessing
- java.lang.Object
-
- com.yahoo.application.container.DocumentProcessing
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,com.yahoo.document.annotation.AnnotationType>
getAnnotationTypes()
com.yahoo.processing.execution.chain.ChainRegistry<com.yahoo.docproc.DocumentProcessor>
getChains()
Returns a registry of configured docproc chains.Map<String,com.yahoo.document.DocumentType>
getDocumentTypes()
com.yahoo.docproc.DocumentProcessor.Progress
process(com.yahoo.component.ComponentSpecification chain, com.yahoo.docproc.Processing processing)
Processes the given Processing through the specified chain.com.yahoo.docproc.DocumentProcessor.Progress
processOnce(com.yahoo.component.ComponentSpecification chain, com.yahoo.docproc.Processing processing)
Processes the given Processing through the specified chain.
-
-
-
Method Detail
-
process
public com.yahoo.docproc.DocumentProcessor.Progress process(com.yahoo.component.ComponentSpecification chain, com.yahoo.docproc.Processing processing)
Processes the given Processing through the specified chain. Note that if oneDocumentProcessor
in the chain returns aDocumentProcessor.LaterProgress
, the calling thread will sleep for the duration specified inDocumentProcessor.LaterProgress#getDelay()
, and then run again. This method will hence return when a document processor returnsDocumentProcessor.Progress#DONE
orDocumentProcessor.Progress#FAILED
, throws an exception, or if the calling thread is interrupted. This method will never return aDocumentProcessor.LaterProgress
.- Parameters:
chain
- the specification of the chain to executeprocessing
- the Processing to process- Returns:
- Progress.DONE or Progress.FAILED
- Throws:
RuntimeException
- if one of the document processors in the chain throws, or if the calling thread is interrupted
-
processOnce
public com.yahoo.docproc.DocumentProcessor.Progress processOnce(com.yahoo.component.ComponentSpecification chain, com.yahoo.docproc.Processing processing)
Processes the given Processing through the specified chain. Note that if oneDocumentProcessor
in the chain returns aDocumentProcessor.LaterProgress
, it will be returned by this method. This method will hence return whenever a document processor returns anyDocumentProcessor.Progress
, or throws an exception.- Parameters:
chain
- the specification of the chain to executeprocessing
- the Processing to process- Returns:
- any Progress
- Throws:
RuntimeException
- if one of the document processors in the chain throws
-
getChains
public com.yahoo.processing.execution.chain.ChainRegistry<com.yahoo.docproc.DocumentProcessor> getChains()
Returns a registry of configured docproc chains.- Returns:
- a registry of configured docproc chains
-
-