Package com.yahoo.docproc.impl
Class DocprocExecutor
java.lang.Object
com.yahoo.docproc.impl.DocprocExecutor
An executor executed incoming processings on its CallStack
- Author:
- Einar M R Rosenvinge
-
Constructor Summary
ConstructorDescriptionDocprocExecutor
(DocprocExecutor oldExecutor, CallStack callStack) Creates a new named DocprocExecutor, with the same instance variables as the given executor, but a new call stack.DocprocExecutor
(String name, CallStack callStack) Creates a new named DocprocExecutor with the given CallStack. -
Method Summary
Modifier and TypeMethodDescriptiongetName()
process
(Processing processing) Processes a given Processing through the CallStack of this executor.processUntilDone
(Processing processing) Processes a given Processing through the CallStack of this executor.
-
Constructor Details
-
DocprocExecutor
Creates a new named DocprocExecutor with the given CallStack.- Parameters:
name
- the name of this executorcallStack
- the chain of document processors this executor shall execute on processings
-
DocprocExecutor
Creates a new named DocprocExecutor, with the same instance variables as the given executor, but a new call stack.- Parameters:
oldExecutor
- the executor to inherit the instance variables from, sans call stack.callStack
- the call stack to use.
-
-
Method Details
-
getCallStack
-
getName
-
process
Processes a given Processing through the CallStack of this executor.- Parameters:
processing
- the Processing to process. The CallStack of the Processing will be set to a clone of the CallStack of this executor, iff. it is currently null.- Returns:
- a Progress; if this is LATER, the Processing is not done and must be reprocessed later.
- Throws:
RuntimeException
- if a document processor throws an exception during processing.- See Also:
-
processUntilDone
Processes a given Processing through the CallStack of this executor. Note that if a DocumentProcessor returns a LaterProgress for this processing, it will be re-processed (after waiting the specified delay given by the LaterProgress), until done or failed.- Parameters:
processing
- the Processing to process. The CallStack of the Processing will be set to a clone of the CallStack of this executor, iff. it is currently null.- Returns:
- a Progress; this is never a LaterProgress.
- Throws:
RuntimeException
- if a document processor throws an exception during processing, or this thread is interrupted while waiting.- See Also:
-