Package org.apache.tika.batch.builders
Class BatchProcessBuilder
java.lang.Object
org.apache.tika.batch.builders.BatchProcessBuilder
Builds a BatchProcessor from a combination of runtime arguments and the
config file.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild
(InputStream is, Map<String, String> runtimeAttributes) Builds a BatchProcess from runtime arguments and a input stream of a configuration file.Builds a FileResourceBatchProcessor from runtime arguments and a document node of a configuration file.static int
getNumConsumers
(Map<String, String> attrs) numConsumers is needed by both the crawler and the consumers.
-
Field Details
-
DEFAULT_MAX_QUEUE_SIZE
public static final int DEFAULT_MAX_QUEUE_SIZE- See Also:
-
MAX_QUEUE_SIZE_KEY
- See Also:
-
NUM_CONSUMERS_KEY
- See Also:
-
-
Constructor Details
-
BatchProcessBuilder
public BatchProcessBuilder()
-
-
Method Details
-
getNumConsumers
numConsumers is needed by both the crawler and the consumers. This utility method is to be used to extract the number of consumers from a map of String key value pairs.If the value is "default", not a parseable integer or has a value < 1, then
AbstractConsumersBuilder
'sgetDefaultNumConsumers()
- Parameters:
attrs
- attributes from which to select the NUM_CONSUMERS_KEY- Returns:
- number of consumers
-
build
Builds a BatchProcess from runtime arguments and a input stream of a configuration file. With the exception of the QueueBuilder, the builders choose how to adjudicate between runtime arguments and the elements in the configuration file. This does not close the InputStream!- Parameters:
is
- inputStreamruntimeAttributes
- incoming runtime attributes- Returns:
- batch process
- Throws:
IOException
-
build
Builds a FileResourceBatchProcessor from runtime arguments and a document node of a configuration file. With the exception of the QueueBuilder, the builders choose how to adjudicate between runtime arguments and the elements in the configuration file.- Parameters:
docElement
- document element of the xml config fileincomingRuntimeAttributes
- runtime arguments- Returns:
- FileResourceBatchProcessor
-