public abstract class PipesIterator extends ConfigBase implements Callable<Integer>, Iterable<FetchEmitTuple>, Initializable
enqueue()
.
If there's an exception in the enqueuing thread, this will throw
a RuntimeException. It will throw an IllegalStateException if
next() is called after hasNext() has returned false.Modifier and Type | Field and Description |
---|---|
static FetchEmitTuple |
COMPLETED_SEMAPHORE |
static long |
DEFAULT_MAX_WAIT_MS |
static int |
DEFAULT_QUEUE_SIZE |
Constructor and Description |
---|
PipesIterator() |
buildComposite, buildComposite, buildSingle, configure, handleSettings
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public static final long DEFAULT_MAX_WAIT_MS
public static final int DEFAULT_QUEUE_SIZE
public static final FetchEmitTuple COMPLETED_SEMAPHORE
public static PipesIterator build(Path tikaConfigFile) throws IOException, TikaConfigException
IOException
TikaConfigException
public String getFetcherName()
public String getEmitterName()
@Field public void setMaxWaitMs(long maxWaitMs)
@Field public void setQueueSize(int queueSize)
public FetchEmitTuple.ON_PARSE_EXCEPTION getOnParseException()
@Field public void setOnParseException(String onParseException) throws TikaConfigException
TikaConfigException
public void setOnParseException(FetchEmitTuple.ON_PARSE_EXCEPTION onParseException)
@Field public void setWriteLimit(int writeLimit)
@Field public void setMaxEmbeddedResources(int maxEmbeddedResources)
public void setParseMode(HandlerConfig.PARSE_MODE parsePARSEMode)
protected HandlerConfig getHandlerConfig()
protected abstract void enqueue() throws IOException, TimeoutException, InterruptedException
protected void tryToAdd(FetchEmitTuple p) throws InterruptedException, TimeoutException
InterruptedException
TimeoutException
public void initialize(Map<String,Param> params) throws TikaConfigException
initialize
in interface Initializable
params
- params to use for initializationTikaConfigException
public void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException
checkInitialization
in interface Initializable
problemHandler
- if there is a problem and no
custom initializableProblemHandler has been configured
via Initializable parameters,
this is called to respond.TikaConfigException
public Iterator<FetchEmitTuple> iterator()
iterator
in interface Iterable<FetchEmitTuple>
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.