public class BatchProcessBuilder extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_QUEUE_SIZE |
static String |
MAX_QUEUE_SIZE_KEY |
static String |
NUM_CONSUMERS_KEY |
Constructor and Description |
---|
BatchProcessBuilder() |
Modifier and Type | Method and Description |
---|---|
BatchProcess |
build(InputStream is,
Map<String,String> runtimeAttributes)
Builds a BatchProcess from runtime arguments and a
input stream of a configuration file.
|
BatchProcess |
build(Node docElement,
Map<String,String> incomingRuntimeAttributes)
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.
|
public static final int DEFAULT_MAX_QUEUE_SIZE
public static final String MAX_QUEUE_SIZE_KEY
public static final String NUM_CONSUMERS_KEY
public static int getNumConsumers(Map<String,String> attrs)
If the value is "default", not a parseable integer or has a value < 1,
then AbstractConsumersBuilder
's getDefaultNumConsumers()
attrs
- attributes from which to select the NUM_CONSUMERS_KEYpublic BatchProcess build(InputStream is, Map<String,String> runtimeAttributes) throws IOException
is
- inputStreamruntimeAttributes
- incoming runtime attributesIOException
public BatchProcess build(Node docElement, Map<String,String> incomingRuntimeAttributes)
docElement
- document element of the xml config fileincomingRuntimeAttributes
- runtime argumentsCopyright © 2007–2023 The Apache Software Foundation. All rights reserved.