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, buildSingle, configure, handleSettingsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic 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
IOExceptionTikaConfigExceptionpublic 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
TikaConfigExceptionpublic 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
InterruptedExceptionTimeoutExceptionpublic void initialize(Map<String,Param> params) throws TikaConfigException
initialize in interface Initializableparams - params to use for initializationTikaConfigExceptionpublic void checkInitialization(InitializableProblemHandler problemHandler) throws TikaConfigException
checkInitialization in interface InitializableproblemHandler - if there is a problem and no
custom initializableProblemHandler has been configured
via Initializable parameters,
this is called to respond.TikaConfigExceptionpublic Iterator<FetchEmitTuple> iterator()
iterator in interface Iterable<FetchEmitTuple>Copyright © 2007–2022 The Apache Software Foundation. All rights reserved.